-
Notifications
You must be signed in to change notification settings - Fork 762
Scroll Into View for Focused Item #9827
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Could you add a test in tests/cases?
You can see existing test case for the flickable in tests/cases/elements/flickable and the focus in tests/cases/focus
37486b8 to
4dc0e78
Compare
131d2fe to
dcd6fce
Compare
92534ec to
2dbfb20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good, thank you.
When a scroll view contains an item that has focus and the window is resized so that the item would scroll out of view, the scroll view is scrolled so that the item stays visible.
This PR also adds the "scroll to visible" functionality to elements when gaining focus, but I haven't found a way yet to get offscreen elements to gain focus, so I couldn't test this. It does work for partially clipped items though.
Fixes #3067