PolymerElements / iron-a11y-keys-behavior

A behavior that enables keybindings for greater a11y
24 stars 41 forks source link

No longer leads to an error in combination with `disable-upgrade`. #71

Closed ghost closed 7 years ago

ghost commented 7 years ago

Fixes an issue where an element with this behavior and disable-upgrade throws an error when the element gets detached.

googlebot commented 7 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


ghost commented 7 years ago

I signed it!

googlebot commented 7 years ago

CLAs look good, thanks!

valdrinkoshi commented 7 years ago

This is no longer the case with Polymer 2.x or 1.x

ghost commented 7 years ago

Hi, thanks for your answer but I can recreate the problem in your jsbin for Polymer 1.x. If the x-key-aware component with disable-upgrade gets removed from the page, detached of the iron-a11y-keys-behavior is called and leads to an error in _unlistenKeyEventListeners.

image

valdrinkoshi commented 7 years ago

Oh wow, that looks more a Polymer bug rather than of this behavior... Updated the jsbin http://jsbin.com/miqoxuf/3/edit?html,console,output Mind opening an issue in https://github.com/Polymer/polymer/issues?

ghost commented 7 years ago

Thanks for the updated jsbin! I will open the issue. Am I right that detached should not be called in this case?