Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@vaadin/component-base

Package Overview
Dependencies
Maintainers
12
Versions
597
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
25.0.11
to
25.0.12
+4
-4
package.json
{
"name": "@vaadin/component-base",
"version": "25.0.11",
"version": "25.0.12",
"publishConfig": {

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

"devDependencies": {
"@vaadin/chai-plugins": "~25.0.11",
"@vaadin/test-runner-commands": "~25.0.11",
"@vaadin/chai-plugins": "~25.0.12",
"@vaadin/test-runner-commands": "~25.0.12",
"@vaadin/testing-helpers": "^2.0.0",
"sinon": "^21.0.0"
},
"gitHead": "3dbf8fa04940ee5bbf1d1169204f5b9e26482d3a"
"gitHead": "4da2fac35ba4a02254c6e18c8392fa445d873d13"
}

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

export function defineCustomElement(CustomElement, version = '25.0.11') {
export function defineCustomElement(CustomElement, version = '25.0.12') {
Object.defineProperty(CustomElement, 'version', {

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

@@ -524,7 +524,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;
}

@@ -531,0 +539,0 @@