Fix for RouteFocusChanged and focusable descendants#925
Merged
xStrom merged 5 commits intolinebender:masterfrom May 14, 2020
Merged
Fix for RouteFocusChanged and focusable descendants#925xStrom merged 5 commits intolinebender:masterfrom
xStrom merged 5 commits intolinebender:masterfrom
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
Member
|
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. |
xStrom
reviewed
May 14, 2020
Member
xStrom
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
I think I addressed everything, and fixed the conflict. |
xStrom
approved these changes
May 14, 2020
Member
xStrom
left a comment
There was a problem hiding this comment.
Looks good now, thanks for doing this!
Contributor
Author
|
Thank you for reviewing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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