@lion/button
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.5.3](https://github.com/ing-bank/lion/compare/@lion/button@0.5.2...@lion/button@0.5.3) (2020-01-30) | ||
### Bug Fixes | ||
* **button:** using space on button should not scroll page ([#531](https://github.com/ing-bank/lion/issues/531)) ([52aaa75](https://github.com/ing-bank/lion/commit/52aaa756a7c3501e20ac5547c39cecf1b3a541ab)) | ||
## [0.5.2](https://github.com/ing-bank/lion/compare/@lion/button@0.5.1...@lion/button@0.5.2) (2020-01-20) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@lion/button", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "A button that is easily styleable and accessible in all contexts", | ||
@@ -43,3 +43,3 @@ "author": "ing-bank", | ||
}, | ||
"gitHead": "4025dd01491c2a1355474f7a0265f75bce8f6fa3" | ||
"gitHead": "4ce24576a70c2b6d8e172557b2d7f6f1e820ee76" | ||
} |
@@ -5,2 +5,4 @@ import { css, html, SlotMixin, DisabledWithTabIndexMixin, LitElement } from '@lion/core'; | ||
const isKeyboardClickEvent = e => e.keyCode === 32 /* space */ || e.keyCode === 13; /* enter */ | ||
// eslint-disable-next-line class-methods-use-this | ||
const isSpaceKeyboardClickEvent = e => e.keyCode === 32; /* space */ | ||
@@ -231,2 +233,7 @@ export class LionButton extends DisabledWithTabIndexMixin(SlotMixin(LitElement)) { | ||
} | ||
if (isSpaceKeyboardClickEvent(e)) { | ||
e.preventDefault(); | ||
} | ||
// FIXME: In Edge & IE11, this toggling the active state to prevent bounce, does not work. | ||
@@ -233,0 +240,0 @@ this.active = true; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56769
624