-
Notifications
You must be signed in to change notification settings - Fork 780
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
check parent focus #4236
check parent focus #4236
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.
Just a quick Q before merging
if isinstance(node, Widget) and node.focusable: | ||
return node |
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.
Do we need to guard against a pathological case where the node that was clicked isn't focusable, one of its DOM ancestors is focusable, but the position clicked doesn't fall within said ancestor?
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.
That rarely occurs, since widgets are clipped within the boundary of their parents. The one exception is the overlay rule, and we decided that if you click on the overlay it should focus the DOM parent, even if it isn't directly under the mouse.
Clicking the screen should check for focusable ancestors, rather than just the widget underneath the mouse.