fix(button): prevent unnecessary keydown/keyup handlers

This commit is contained in:
Mikhail Bashkirov 2019-07-26 16:45:49 +02:00
parent f3303ae014
commit 06124e06bf

View file

@ -202,7 +202,7 @@ export class LionButton extends DisabledWithTabIndexMixin(
}
__keydownHandler(e) {
if (!this.__isKeyboardClickEvent(e)) {
if (this.active || !this.__isKeyboardClickEvent(e)) {
return;
}
this.active = true;