-
Notifications
You must be signed in to change notification settings - Fork 64
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
paper button receives 'keyboard-focus' when refocusing tab #24
Comments
I can confirm this problem, this happens on the official polymer-project website too. |
confirmed as well; similar things occur with radio-buttons, etc., which seems especially broken. |
@cdata Sigh. I think this might also be an instance of the "focus without a mouse down is automatically a keyboard focus" issue, which is technically not super true in the "re-activate tab" case :( |
This is related to PolymerElements/paper-radio-button#33. |
This looks like it is still an issue as of merging PolymerElements/iron-behaviors#23 @notwaldorf could you take a look? |
Quick bump on this issue |
Ping? |
Gentle ping on this. |
Any update? Coming up on a year since this was filed. |
The reason why this still hasn't been fixed is because the platform gives us no reliable way of determining whether focus came from a mouse or keyboard (which, in Material Design, look different when focused). Currently, we rely on the state of the pointer (https://github.com/PolymerElements/iron-behaviors/blob/master/iron-button-state.html#L116), but the pointer will not be pressed when switching between tabs, so that is why it has "keyboard-focus". We are actively looking for other ways to fix this, but there doesn't seem to be any alternatives. |
Is there a reason we can't just listen for whether or not the tab is active on the window and then blur the focus? I tested this within the ready function of the paper-button element and this fixes the issue however I'm not sure where the right place for this would be or if there might be a better variation of this because I might not be thinking of other situations.
|
hitting this bug five years later. any workarounds? |
Addresses this issue: Tangerine-Community/Tangerine#2342 Workaround for this issue in paper-button PolymerElements/paper-button#24
Hey @esurface it seems unlikely that there will be significant changes to this component moving forward. It is possible that the issue could be taken up by someone in the community to be fixed. I'm happy to look at any PR someone might come up with to attempt a fix. |
If you click a paper-button, then unfocus and refocus the tab, paper-button receives the keyboard-focus class. It also looks like this happens with other elements (e.g. paper-icon-button), and it leads to a somewhat broken looking experience.
The text was updated successfully, but these errors were encountered: