@spectrum-web-components/menu
Advanced tools
Comparing version 0.10.1-lit-next.0 to 0.10.1
{ | ||
"name": "@spectrum-web-components/menu", | ||
"version": "0.10.1-lit-next.0+fc74d25d8", | ||
"version": "0.10.1", | ||
"publishConfig": { | ||
@@ -53,7 +53,7 @@ "access": "public" | ||
"dependencies": { | ||
"@spectrum-web-components/action-button": "^0.6.1-lit-next.0+fc74d25d8", | ||
"@spectrum-web-components/base": "^0.4.6-lit-next.222+fc74d25d8", | ||
"@spectrum-web-components/icon": "^0.10.1-lit-next.0+fc74d25d8", | ||
"@spectrum-web-components/icons-ui": "^0.7.1-lit-next.0+fc74d25d8", | ||
"@spectrum-web-components/shared": "^0.12.11-lit-next.0+fc74d25d8", | ||
"@spectrum-web-components/action-button": "^0.6.1", | ||
"@spectrum-web-components/base": "^0.4.6", | ||
"@spectrum-web-components/icon": "^0.10.1", | ||
"@spectrum-web-components/icons-ui": "^0.7.1", | ||
"@spectrum-web-components/shared": "^0.12.11", | ||
"tslib": "^2.0.0" | ||
@@ -69,3 +69,3 @@ }, | ||
], | ||
"gitHead": "fc74d25d89dbbcbf6c70ad8c5a41bac5ac6f130a" | ||
"gitHead": "9c7ac25264762a9b7bad2ef3f111d5eb613f9d05" | ||
} |
@@ -92,3 +92,3 @@ import { SpectrumElement, CSSResultArray, TemplateResult, PropertyValues } from '@spectrum-web-components/base'; | ||
protected cacheUpdated: Promise<void>; | ||
protected getUpdateComplete(): Promise<boolean>; | ||
protected _getUpdateComplete(): Promise<boolean>; | ||
} |
@@ -449,17 +449,3 @@ /* | ||
} | ||
const activeElement = this.getRootNode().activeElement; | ||
let shouldFocus = false; | ||
try { | ||
// Browsers without support for the `:focus-visible` | ||
// selector will throw on the following test (Safari, older things). | ||
// Some won't throw, but will be focusing item rather than the menu and | ||
// will rely on the polyfill to know whether focus is "visible" or not. | ||
shouldFocus = | ||
activeElement.matches(':focus-visible') || | ||
activeElement.matches('.focus-visible'); | ||
} | ||
catch (error) { | ||
shouldFocus = activeElement.matches('.focus-visible'); | ||
} | ||
item.focused = shouldFocus; | ||
item.focused = this.hasVisibleFocusInTree(); | ||
this.setAttribute('aria-activedescendant', item.id); | ||
@@ -528,4 +514,4 @@ if (item.menuData.selectionRoot && | ||
} | ||
async getUpdateComplete() { | ||
const complete = (await super.getUpdateComplete()); | ||
async _getUpdateComplete() { | ||
const complete = (await super._getUpdateComplete()); | ||
await this.childItemsUpdated; | ||
@@ -532,0 +518,0 @@ await this.cacheUpdated; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
0
331088
4557