New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll to top of Dialog #9186
Comments
If you want to manipulate the Check StackOverflow and similar sources for other questions on how to use the library. 😄 |
This way each changing component will have it's own content, scrolled to the top. |
The suggestion from @m2mathew doesn't work because window.scroll doesn't work on dialogs. I've found no solution for scrolling to an element in a dialog. If it's possible, I'd be happy to submit a PR documenting how to do so. |
Just ran into this. Has anyone figured out a solution? |
@JoeDuncko please try my solution. |
I was able to get this working using @achikin solution. Just nest a div inside of dialog content then render another dialog content.
|
Expected Behavior
I'm rendering a pretty long component within the dialog, and am using the autoscroll functionality to get the
overflow-y: auto
styling in the dialog content. At certain points, the component moves to the the next step, and I would like to instantly go to the top of the dialog content.I saw that jQuery's scrollTop function can be used to get to the top of a component, but I'm unsure how to reference the dialogContent div. Please advise.
Current Behavior
Currently, when the component changes, the scroll remains the same, and the result is that the user sees a lower part of the new component.
Your Environment
The text was updated successfully, but these errors were encountered: