@vaadin/component-base
Advanced tools
Comparing version 23.1.4 to 23.1.5
{ | ||
"name": "@vaadin/component-base", | ||
"version": "23.1.4", | ||
"version": "23.1.5", | ||
"publishConfig": { | ||
@@ -45,3 +45,3 @@ "access": "public" | ||
}, | ||
"gitHead": "0a82302064f1276a000f0cbd810076539407d133" | ||
"gitHead": "326938919a54353231af25d341ba6076c249afee" | ||
} |
@@ -82,17 +82,14 @@ /** | ||
this._setActive(true); | ||
} | ||
} | ||
/** | ||
* Removes the `active` attribute from the element if the activation key is released. | ||
* | ||
* @param {KeyboardEvent} event | ||
* @protected | ||
* @override | ||
*/ | ||
_onKeyUp(event) { | ||
super._onKeyUp(event); | ||
if (this._activeKeys.includes(event.key)) { | ||
this._setActive(false); | ||
// Element can become hidden before the `keyup` event, e.g. on button click. | ||
// Use document listener to ensure `active` attribute is removed correctly. | ||
document.addEventListener( | ||
'keyup', | ||
(e) => { | ||
if (this._activeKeys.includes(e.key)) { | ||
this._setActive(false); | ||
} | ||
}, | ||
{ once: true }, | ||
); | ||
} | ||
@@ -99,0 +96,0 @@ } |
@@ -42,3 +42,3 @@ /** | ||
static get version() { | ||
return '23.1.4'; | ||
return '23.1.5'; | ||
} | ||
@@ -45,0 +45,0 @@ |
@@ -128,3 +128,7 @@ /** | ||
const nextIndex = (focusableElements.length + currentIndex + step) % focusableElements.length; | ||
focusableElements[nextIndex].focus(); | ||
const element = focusableElements[nextIndex]; | ||
element.focus(); | ||
if (element.localName === 'input') { | ||
element.select(); | ||
} | ||
} | ||
@@ -131,0 +135,0 @@ |
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
175270
5005