Skip to content

Conversation

@otgerrogla
Copy link
Contributor

Add support for options to the scroll_to method of RenderedElementBacking to define the desired final logical position inside the scrolling container for the vertical and horizontal axis. For the web platform this maps 1:1 to the options available in the corresponding DOM method scrollIntoView.

The current behavior is pretty limiting as it is only possible to scroll such that the element appears at the top of the scrolling container. Adding these options will add more flexibility, covering common use cases such as a list where when the last element fitting the scroll container is active, you want to just visually advance to the next element, instead of moving the next element to the top of the container.

@otgerrogla otgerrogla requested a review from a team as a code owner April 3, 2025 21:15
@ealmloff ealmloff added enhancement New feature or request breaking This is a breaking change html Related to the html crate labels Apr 3, 2025
@jkelleyrtp jkelleyrtp merged commit 28d3830 into DioxusLabs:main May 7, 2025
AnteDeliria pushed a commit to AnteDeliria/dioxus that referenced this pull request Jun 2, 2025
AnteDeliria pushed a commit to AnteDeliria/dioxus that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking This is a breaking change enhancement New feature or request html Related to the html crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants