fix(button): prevent scrolling when repeating space key
This commit is contained in:
parent
a217b8a128
commit
7eec6f3765
1 changed files with 3 additions and 0 deletions
|
|
@ -235,6 +235,9 @@ export class LionButton extends DisabledWithTabIndexMixin(SlotMixin(LitElement))
|
||||||
|
|
||||||
__keydownHandler(e) {
|
__keydownHandler(e) {
|
||||||
if (this.active || !isKeyboardClickEvent(e)) {
|
if (this.active || !isKeyboardClickEvent(e)) {
|
||||||
|
if (isSpaceKeyboardClickEvent(e)) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue