-
Notifications
You must be signed in to change notification settings - Fork 567
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
Fix for RouteFocusChanged and focusable descendants #925
Conversation
* Route RouteFocusChanged all the way down since a focusable widget may contain descendants which can also have focus * Instead of replacing RouteFocusChanged with FocusChanged, send it after the former is completely routed, so request_focus is cleared * Added a new test case to demonstrate cases that would previously fail, along with some test harness fixes/additions
I'll take a look at this more closely later, but for now I just have one quick comment.
This does not sound correct to me. Only a single widget has focus. |
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.
Okay so now that I've looked more closely I can see that there was a bug with shared ancestors. I think this solution is generally fine, but I have a few inline comments.
I think I addressed everything, and fixed the conflict. |
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.
Looks good now, thanks for doing this!
Thank you for reviewing! |
My project uses a hierarchy of focusable widgets and I ran into some problems which I've attempted to fix here.
Route RouteFocusChanged all the way down since a focusable widget
may contain descendants which can also have focus
Instead of replacing RouteFocusChanged with FocusChanged, send it
after the former is completely routed, so request_focus is cleared
Added a new test case to demonstrate cases that would previously
fail, along with some test harness fixes/additions