@spectrum-web-components/menu
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.2.2](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/menu@0.2.1...@spectrum-web-components/menu@0.2.2) (2019-12-02) | ||
### Bug Fixes | ||
- normalize "event" and "error" argument names ([8d382cd](https://github.com/adobe/spectrum-web-components/commit/8d382cd)) | ||
## [0.2.1](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/menu@0.2.0...@spectrum-web-components/menu@0.2.1) (2019-11-27) | ||
@@ -8,0 +14,0 @@ |
@@ -21,3 +21,3 @@ import { LitElement, CSSResultArray, TemplateResult } from 'lit-element'; | ||
stopListeningToKeyboard(): void; | ||
handleKeydown(e: KeyboardEvent): void; | ||
handleKeydown(event: KeyboardEvent): void; | ||
focusMenuItemByOffset(offset: number): void; | ||
@@ -24,0 +24,0 @@ private prepareToCleanUp; |
@@ -47,4 +47,4 @@ /* | ||
} | ||
onClick(ev) { | ||
const path = ev.composedPath(); | ||
onClick(event) { | ||
const path = event.composedPath(); | ||
const target = path.find((el) => { | ||
@@ -70,4 +70,4 @@ if (!(el instanceof Element)) { | ||
} | ||
handleKeydown(e) { | ||
const { code } = e; | ||
handleKeydown(event) { | ||
const { code } = event; | ||
if (code === 'Tab') { | ||
@@ -80,3 +80,3 @@ this.prepareToCleanUp(); | ||
} | ||
e.preventDefault(); | ||
event.preventDefault(); | ||
const direction = code === 'ArrowDown' ? 1 : -1; | ||
@@ -83,0 +83,0 @@ this.focusMenuItemByOffset(direction); |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "", | ||
@@ -47,3 +47,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "b81218bc84e60248f14a1aee7e58ade0030e52dc" | ||
"gitHead": "b3bff461b5e5cac7211dba5a54dae4c82d809a85" | ||
} |
@@ -68,4 +68,4 @@ /* | ||
private onClick(ev: Event): void { | ||
const path = ev.composedPath(); | ||
private onClick(event: Event): void { | ||
const path = event.composedPath(); | ||
const target = path.find((el) => { | ||
@@ -94,4 +94,4 @@ if (!(el instanceof Element)) { | ||
public handleKeydown(e: KeyboardEvent): void { | ||
const { code } = e; | ||
public handleKeydown(event: KeyboardEvent): void { | ||
const { code } = event; | ||
if (code === 'Tab') { | ||
@@ -104,3 +104,3 @@ this.prepareToCleanUp(); | ||
} | ||
e.preventDefault(); | ||
event.preventDefault(); | ||
const direction = code === 'ArrowDown' ? 1 : -1; | ||
@@ -107,0 +107,0 @@ this.focusMenuItemByOffset(direction); |
Sorry, the diff of this file is not supported yet
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
57955