Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Tab bar shouldn't be focusable #440

Closed
wants to merge 1 commit into from

Conversation

matthewwithanm
Copy link
Contributor

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 shouldn't be merged until after 1.17 leaves beta. For the 1.17 beta, atom/atom#14403 and #439 are the less invasive fixes.

cc @ungb

@matthewwithanm matthewwithanm changed the title Fb mdt dont make tabbar focusable Tab bar shouldn't be focusable 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.
@lee-dohm
Copy link
Contributor

Resolve conflicts and ensure the builds are green then this can be merged! 👍

@iolsen
Copy link
Contributor

iolsen commented Nov 28, 2017

Ping. If you can update this so it merges, we'll merge it.

@matthewwithanm
Copy link
Contributor Author

hey! it looks like almost all of this work was done done by the PR that switched the interaction from mousedown to click, except removing the tabindex attribute. there's probably no harm in removing the tabindex but, given the other change, there isn't really a motivator for doing it either so i'm going to close.

@winstliu winstliu deleted the fb-mdt-dont-make-tabbar-focusable branch December 20, 2018 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants