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.1.2
to
25.1.3
+4
-4
package.json
{
"name": "@vaadin/component-base",
"version": "25.1.2",
"version": "25.1.3",
"publishConfig": {

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

"devDependencies": {
"@vaadin/chai-plugins": "~25.1.2",
"@vaadin/test-runner-commands": "~25.1.2",
"@vaadin/chai-plugins": "~25.1.3",
"@vaadin/test-runner-commands": "~25.1.3",
"@vaadin/testing-helpers": "^2.0.0",

@@ -48,3 +48,3 @@ "sinon": "^21.0.2"

"customElements": "custom-elements.json",
"gitHead": "48e5dc507ac5eb8d34839be06cac652f1635fe1c"
"gitHead": "6faa3dbd92204cfda519d0146de376084234f560"
}

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

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