This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
Pane shouldn't steal focus from its children - #14403
Merged
Merged
Conversation
This was removed in #14175 in order to solve #14173 (editors not being focused when clicking tabs). However, it means that the pane steals focus from its children. The solution is to add the guard back and to solve #14173 in another way: by delaying the activation of the item (see atom/tabs#439).
nathansobo
approved these changes
May 12, 2017
nathansobo
left a comment
Contributor
There was a problem hiding this comment.
As soon as we get a green build on atom/tabs#439 this looks good. Thanks again!
matthewwithanm
added a commit
to atom/tabs
that referenced
this pull request
May 12, 2017
This was originally added way back in 310c058 however, a tabindex of -1 means that the tab bar can receive focus. As a result, focus would end up being transferred to the tab bar as part of the default action of the mousedown handler. When the `Pane` is activated, it would see that its child (the tab bar) had focus and leave it there, meaning the tab bar (instead of the editor) would retain focus. This behavior was first reported in #14173, however the original fix for it (#14175) resulted in Panes always stealing the focus from their children. This regression was rectified with atom/atom#14403 and #439, but really the tab bar shouldn't be focusable in the first place. Making this adjustment means we no longer have to delay the activation of the item and pane (#150 and atom/tabs#tabs#439) since the focus will no longer be given to the tab bar as part of the default action of the mousedown handler.
Contributor
|
Thanks! |
as-cii
pushed a commit
that referenced
this pull request
May 15, 2017
Pane shouldn't steal focus from its children
matthewwithanm
added a commit
to atom/tabs
that referenced
this pull request
May 15, 2017
This was originally added way back in 310c058 however, a tabindex of -1 means that the tab bar can receive focus. As a result, focus would end up being transferred to the tab bar as part of the default action of the mousedown handler. When the `Pane` is activated, it would see that its child (the tab bar) had focus and leave it there, meaning the tab bar (instead of the editor) would retain focus. This behavior was first reported in #14173, however the original fix for it (#14175) resulted in Panes always stealing the focus from their children. This regression was rectified with atom/atom#14403 and #439, but really the tab bar shouldn't be focusable in the first place. Making this adjustment means we no longer have to delay the activation of the item and pane (#150 and atom/tabs#tabs#439) since the focus will no longer be given to the tab bar as part of the default action of the mousedown handler.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This was removed in #14175 in order to solve #14173 (editors not being
focused when clicking tabs). However, it means that the pane steals
focus from its children. The solution is to add the guard back and to
solve #14173 in another way: by delaying the activation of the item
(see atom/tabs#439).