@vaadin/vaadin-context-menu
Advanced tools
Comparing version 4.3.8 to 4.3.9
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-context-menu", | ||
"version": "4.3.8", | ||
"version": "4.3.9", | ||
"main": "vaadin-context-menu.js", | ||
@@ -51,4 +51,4 @@ "author": "Vaadin Ltd", | ||
"wct-browser-legacy": "^1.0.1", | ||
"@vaadin/vaadin-demo-helpers": "^2.2.0" | ||
"@vaadin/vaadin-demo-helpers": "^3.0.0" | ||
} | ||
} |
@@ -75,2 +75,6 @@ /** | ||
static get observers() { | ||
return ['_themeChanged(theme)']; | ||
} | ||
ready() { | ||
@@ -98,2 +102,6 @@ super.ready(); | ||
_themeChanged(theme) { | ||
this.close(); | ||
} | ||
getBoundaries() { | ||
@@ -100,0 +108,0 @@ // Measure actual overlay and content sizes |
@@ -225,2 +225,4 @@ /** | ||
* propagated to the internal `<vaadin-context-menu-overlay>` component. | ||
* In case of using nested menu items, the `theme` attribute is also propagated | ||
* to internal `vaadin-context-menu-list-box` and `vaadin-context-menu-item`'s. | ||
* | ||
@@ -265,3 +267,3 @@ * @memberof Vaadin | ||
static get version() { | ||
return '4.3.8'; | ||
return '4.3.9'; | ||
} | ||
@@ -268,0 +270,0 @@ |
@@ -150,2 +150,9 @@ import { ItemElement } from '@vaadin/vaadin-item/src/vaadin-item.js'; | ||
// Set theme attribute from parent element | ||
if (parent.theme) { | ||
subMenu.setAttribute('theme', parent.theme); | ||
} else { | ||
subMenu.removeAttribute('theme'); | ||
} | ||
let x; | ||
@@ -195,2 +202,3 @@ content.style.minWidth = ''; | ||
component.classList.add('vaadin-menu-item'); | ||
this.theme && component.setAttribute('theme', this.theme); | ||
@@ -238,2 +246,3 @@ component._item = item; | ||
const listBox = root.querySelector('vaadin-context-menu-list-box'); | ||
this.theme && listBox.setAttribute('theme', this.theme); | ||
listBox.classList.add('vaadin-menu-list-box'); | ||
@@ -322,2 +331,9 @@ requestAnimationFrame(() => listBox.setAttribute('role', 'menu')); | ||
(e.keyCode === 39 || e.keyCode === 13 || e.keyCode === 32) && openSubMenu(e)); | ||
} else { | ||
const listBox = root.querySelector('vaadin-context-menu-list-box'); | ||
if (this.theme) { | ||
listBox.setAttribute('theme', this.theme); | ||
} else { | ||
listBox.removeAttribute('theme'); | ||
} | ||
} | ||
@@ -324,0 +340,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
65410
1336
1