Merge pull request #784 from MathieuPuech/fix/button-space-scroll
fix(button): prevent scrolling when repeating space key
This commit is contained in:
commit
38df686ff5
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