@vaadin/vaadin-menu-bar
Advanced tools
Comparing version 1.0.0-alpha2 to 1.0.0-alpha3
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-menu-bar", | ||
"version": "1.0.0-alpha2", | ||
"version": "1.0.0-alpha3", | ||
"main": "vaadin-menu-bar.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -204,2 +204,17 @@ /** | ||
__isOverlayClick(e) { | ||
const path = e.composedPath(); | ||
let overlay = path.filter(node => node instanceof customElements.get('vaadin-context-menu-overlay'))[0]; | ||
while (overlay) { | ||
if (overlay === this._subMenu.$.overlay) { | ||
return true; | ||
} else if (overlay.parentOverlay) { | ||
overlay = overlay.parentOverlay; | ||
} else { | ||
return false; | ||
} | ||
} | ||
} | ||
_onMouseOver(e) { | ||
@@ -233,3 +248,3 @@ const button = Array.from(e.composedPath()).filter(el => el.item)[0]; | ||
__outsideClickListener(e) { | ||
if (!this._getButtonFromEvent(e) && e.composedPath().indexOf(this._subMenu.$.overlay) === -1) { | ||
if (!this._getButtonFromEvent(e) && !this.__isOverlayClick(e)) { | ||
this._close(); | ||
@@ -236,0 +251,0 @@ } |
@@ -98,3 +98,3 @@ /** | ||
static get version() { | ||
return '1.0.0-alpha2'; | ||
return '1.0.0-alpha3'; | ||
} | ||
@@ -101,0 +101,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
44009
818
0