PolymerElements / paper-icon-button

A Material Design icon button
https://www.webcomponents.org/element/PolymerElements/paper-icon-button
42 stars 44 forks source link

[1.0] 'tabindex' is not restored after toggling 'disabled' #20

Closed dzhioev closed 9 years ago

dzhioev commented 9 years ago

Steps to reproduce:

  1. Create <paper-icon-button>
  2. Disable it.
  3. Enable it. The button has 'tabindex' equal to -1 after that, as a result it is not focusable by Tab. Browser: Google Chrome Version 43.0.2357.73 beta (64-bit) Demo: http://dzhioev.net:8080/paper_icon_tabindex.html
notwaldorf commented 9 years ago

This has the same root cause as https://github.com/PolymerElements/paper-icon-button/issues/19 -- the duplicate behaviour is calling the disabledChanged observer twice, which resets the _oldTabIndex twice (and the second time to -1, thus killing any hope of restoring it to a good value in the future).

notwaldorf commented 9 years ago

Fixed with https://github.com/PolymerElements/paper-icon-button/pull/18