@microsoft/fast-foundation
Advanced tools
Comparing version 3.0.0-alpha.14 to 3.0.0-alpha.15
@@ -147,2 +147,6 @@ import { FASTElement, SyntheticViewTemplate } from "@microsoft/fast-element"; | ||
*/ | ||
private closeSubMenu; | ||
/** | ||
* @internal | ||
*/ | ||
private expandAndFocus; | ||
@@ -149,0 +153,0 @@ /** |
import { __decorate } from "tslib"; | ||
import { attr, FASTElement, observable, Updates, } from "@microsoft/fast-element"; | ||
import { Direction, keyArrowLeft, keyArrowRight, keyEnter, keySpace, } from "@microsoft/fast-web-utilities"; | ||
import { Direction, keyArrowLeft, keyArrowRight, keyEnter, keyEscape, keySpace, } from "@microsoft/fast-web-utilities"; | ||
import { StartEnd, } from "../patterns/index.js"; | ||
@@ -70,7 +70,13 @@ import { applyMixins } from "../utilities/apply-mixins.js"; | ||
return false; | ||
case keyEscape: | ||
// close submenu | ||
if (this.expanded) { | ||
this.closeSubMenu(); | ||
return false; | ||
} | ||
break; | ||
case keyArrowLeft: | ||
//close submenu | ||
if (this.expanded) { | ||
this.expanded = false; | ||
this.focus(); | ||
this.closeSubMenu(); | ||
return false; | ||
@@ -127,2 +133,10 @@ } | ||
*/ | ||
this.closeSubMenu = () => { | ||
// close submenu | ||
this.expanded = false; | ||
this.focus(); | ||
}; | ||
/** | ||
* @internal | ||
*/ | ||
this.expandAndFocus = () => { | ||
@@ -129,0 +143,0 @@ if (!this.hasSubmenu) { |
@@ -5,3 +5,3 @@ { | ||
"sideEffects": false, | ||
"version": "3.0.0-alpha.14", | ||
"version": "3.0.0-alpha.15", | ||
"author": { | ||
@@ -97,3 +97,3 @@ "name": "Microsoft", | ||
"dependencies": { | ||
"@microsoft/fast-element": "^2.0.0-beta.11", | ||
"@microsoft/fast-element": "^2.0.0-beta.12", | ||
"@microsoft/fast-web-utilities": "^6.0.0", | ||
@@ -100,0 +100,0 @@ "tabbable": "^5.2.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
5126004
131576