PolymerElements / paper-button

A button à la Material Design
https://www.webcomponents.org/element/PolymerElements/paper-button
138 stars 64 forks source link

Keyboard enter or space does not trigger link #147

Closed kennethklee closed 7 years ago

kennethklee commented 7 years ago

Description

When used with an anchor link, a pressing enter or space on a keyboard while focused does not trigger the anchor.

Expected outcome

Pressing enter or space with the button focused should trigger the parent anchor link.

Actual outcome

Nothing happens.

Live Demo

Steps to reproduce

  1. Put an anchor element, <a>.
  2. Put a child <paper-button> element.
  3. Focus the <paper-button element.
  4. Press enter or space.

Browsers Affected

kennethklee commented 7 years ago

Hopefully that PR is good. ^

abdonrd commented 7 years ago

The last demo show you how to use the paper-button as an anchor: webcomponents.org/element/PolymerElements/paper-button/demo/demo/

<a href="https://www.polymer-project.org" tabindex="-1">
  <paper-button raised>Polymer Project</paper-button>
</a>
kennethklee commented 7 years ago

oh you're right it works all of a sudden. i wonder why it wasn't working on my computer before. nor on my project. anyway closing. closing PR too.