Make sure a close event doesn't close more than one dialog
This commit is contained in:
parent
b725bceb4f
commit
89a8f893c2
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tp/tp-dialog",
|
"name": "@tp/tp-dialog",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "tp-dialog.js",
|
"main": "tp-dialog.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -123,7 +123,12 @@ class TpDialog extends EventHelpers(LitElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close(e) {
|
||||||
|
if (e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
this.dialog.close();
|
this.dialog.close();
|
||||||
this.dispatchEvent(new CustomEvent('closed', { detail: null, bubbles: true, composed: true }));
|
this.dispatchEvent(new CustomEvent('closed', { detail: null, bubbles: true, composed: true }));
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user