🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@vaadin/component-base

Package Overview
Dependencies
Maintainers
12
Versions
605
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/component-base - npm Package Compare versions

Comparing version
24.10.3
to
24.10.4
+4
-4
package.json
{
"name": "@vaadin/component-base",
"version": "24.10.3",
"version": "24.10.4",
"publishConfig": {

@@ -41,8 +41,8 @@ "access": "public"

"devDependencies": {
"@vaadin/chai-plugins": "~24.10.3",
"@vaadin/test-runner-commands": "~24.10.3",
"@vaadin/chai-plugins": "~24.10.4",
"@vaadin/test-runner-commands": "~24.10.4",
"@vaadin/testing-helpers": "^1.1.0",
"sinon": "^18.0.0"
},
"gitHead": "b9656d87dcb414d1867ff04bcf288462f549d065"
"gitHead": "db2b55d7760803aacfff86694c3124a563d782c3"
}

@@ -16,3 +16,3 @@ /**

export function defineCustomElement(CustomElement, version = '24.10.3') {
export function defineCustomElement(CustomElement, version = '24.10.4') {
Object.defineProperty(CustomElement, 'version', {

@@ -19,0 +19,0 @@ get() {

@@ -487,7 +487,15 @@ /**

__getFocusedElement(visibleElements = this.__getVisibleElements()) {
return visibleElements.find(
(element) =>
element.contains(this.elementsContainer.getRootNode().activeElement) ||
element.contains(this.scrollTarget.getRootNode().activeElement),
);
// `document.activeElement` retargets to the outermost shadow host when
// focus lives in a nested shadow tree. Descend through nested shadow
// roots' `activeElement`s to reach the real focused node, then walk up
// the flattened tree (via `assignedSlot`/`parentNode`/`host`) until a
// visible row is reached.
let node = document.activeElement;
while (node?.shadowRoot?.activeElement) {
node = node.shadowRoot.activeElement;
}
while (node && !visibleElements.includes(node)) {
node = node.assignedSlot || node.parentNode || node.host;
}
return node;
}

@@ -494,0 +502,0 @@