Giter Club home page Giter Club logo

Comments (14)

kungufli avatar kungufli commented on August 16, 2024

I can confirm this problem, this happens on the official polymer-project website too.

from paper-button.

m4b avatar m4b commented on August 16, 2024

confirmed as well; similar things occur with radio-buttons, etc., which seems especially broken.

from paper-button.

notwaldorf avatar notwaldorf commented on August 16, 2024

@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 :(

from paper-button.

notwaldorf avatar notwaldorf commented on August 16, 2024

This is related to PolymerElements/paper-radio-button#33.

from paper-button.

tjsavage avatar tjsavage commented on August 16, 2024

This looks like it is still an issue as of merging PolymerElements/iron-behaviors#23

@notwaldorf could you take a look?

from paper-button.

notwaldorf avatar notwaldorf commented on August 16, 2024

@tjsavage this isn't a new bug, it's been around forever (including 0.5). i think @cdata is our focus expert, unfortunately.

from paper-button.

tjsavage avatar tjsavage commented on August 16, 2024

Quick bump on this issue

from paper-button.

anthonytordillos avatar anthonytordillos commented on August 16, 2024

Ping?

from paper-button.

rictic avatar rictic commented on August 16, 2024

Gentle ping on this.

from paper-button.

anthonytordillos avatar anthonytordillos commented on August 16, 2024

Any update? Coming up on a year since this was filed.

from paper-button.

keanulee avatar keanulee commented on August 16, 2024

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.

from paper-button.

MichaelScript avatar MichaelScript commented on August 16, 2024

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.

document.addEventListener('visibilitychange',function(){
	console.log("Changed");
	this.blur();
}.bind(this));

from paper-button.

esurface avatar esurface commented on August 16, 2024

hitting this bug five years later. any workarounds?

from paper-button.

cdata avatar cdata commented on August 16, 2024

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.

from paper-button.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.