@vaadin/a11y-base
Advanced tools
Comparing version 24.3.18 to 24.3.19
{ | ||
"name": "@vaadin/a11y-base", | ||
"version": "24.3.18", | ||
"version": "24.3.19", | ||
"publishConfig": { | ||
@@ -35,3 +35,3 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "~24.3.18", | ||
"@vaadin/component-base": "~24.3.19", | ||
"lit": "^3.0.0" | ||
@@ -44,3 +44,3 @@ }, | ||
}, | ||
"gitHead": "48c098f213c652b55cf43552226f1aa3fe521189" | ||
"gitHead": "5e9460d995aabed74fe1d92b17f45fe79c5d9f83" | ||
} |
@@ -26,3 +26,3 @@ /** | ||
*/ | ||
restoreFocus() { | ||
restoreFocus(options) { | ||
const focusNode = this.focusNode; | ||
@@ -33,2 +33,4 @@ if (!focusNode) { | ||
const preventScroll = options ? options.preventScroll : false; | ||
if (getDeepActiveElement() === document.body) { | ||
@@ -39,5 +41,5 @@ // In Firefox and Safari, focusing the node synchronously | ||
// there until the next event loop iteration. | ||
setTimeout(() => focusNode.focus()); | ||
setTimeout(() => focusNode.focus({ preventScroll })); | ||
} else { | ||
focusNode.focus(); | ||
focusNode.focus({ preventScroll }); | ||
} | ||
@@ -44,0 +46,0 @@ |
@@ -169,3 +169,4 @@ /** | ||
this._setFocusable(selected || 0); | ||
// When selected is set to -1, focus the first available item. | ||
this._setFocusable(selected < 0 || !selected ? 0 : selected); | ||
@@ -172,0 +173,0 @@ const itemToSelect = items[selected]; |
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
103304
2728