Fix naming.
This commit is contained in:
parent
6442c38926
commit
721f2a4f4a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-popup",
|
"name": "@tp/tp-popup",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-popup.js",
|
"main": "tp-popup.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -163,15 +163,15 @@ class TpPopup extends EventHelpers(Position(DomQuery(LitElement))) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_docClick(e) {
|
_docClick(e) {
|
||||||
const isThisPopover = e.composedPath().indexOf(this) > -1;
|
const isThisPopup = e.composedPath().indexOf(this) > -1;
|
||||||
if (!isThisPopover && this.isOpen) {
|
if (!isThisPopup && this.isOpen) {
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onClick(e) {
|
_onClick(e) {
|
||||||
const toggle = closest(e.composedPath()[0], '[slot="toggle"]', true) === this.toggleEl;
|
const toggle = closest(e.composedPath()[0], '[slot="toggle"]', true) === this.toggleEl;
|
||||||
const closePopover = closest(e.composedPath()[0], '[close-popover]', true);
|
const closePopup = closest(e.composedPath()[0], '[close-popup]', true);
|
||||||
|
|
||||||
if (toggle && this.toggleEl.hasAttribute('disabled')) return;
|
if (toggle && this.toggleEl.hasAttribute('disabled')) return;
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ class TpPopup extends EventHelpers(Position(DomQuery(LitElement))) {
|
|||||||
this.toggle();
|
this.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (closePopover) {
|
if (closePopup) {
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user