🚀 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.9.15
to
24.9.16
+4
-4
package.json
{
"name": "@vaadin/component-base",
"version": "24.9.15",
"version": "24.9.16",
"publishConfig": {

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

"devDependencies": {
"@vaadin/chai-plugins": "~24.9.15",
"@vaadin/test-runner-commands": "~24.9.15",
"@vaadin/chai-plugins": "~24.9.16",
"@vaadin/test-runner-commands": "~24.9.16",
"@vaadin/testing-helpers": "^1.1.0",
"sinon": "^18.0.0"
},
"gitHead": "8756a6ebeb49b47bc20769014a03f49976a7af2e"
"gitHead": "518ee03db7a60c23ce70008af8793f19e9c0fcd2"
}

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

export function defineCustomElement(CustomElement, version = '24.9.15') {
export function defineCustomElement(CustomElement, version = '24.9.16') {
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 @@