Commit a6bdd98 1 parent 00f5940 commit a6bdd98 Copy full SHA for a6bdd98
File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ export class ConfirmationModal extends HTMLElement {
25
25
confirmButton . className += " " + confirmButtonExtraClass ;
26
26
27
27
const showButton = selectOrError ( "[slot=show-button]" , this ) ;
28
- showButton . addEventListener ( "click" , ( ) => this . dialog . showModal ( ) ) ;
28
+ showButton . addEventListener ( "click" , event => {
29
+ event . stopPropagation ( ) ;
30
+ this . dialog . showModal ( ) ;
31
+ } ) ;
29
32
const updateDisabledAttribute = ( ) => {
30
33
this . toggleAttribute ( "disabled" , showButton . hasAttribute ( "disabled" ) ) ;
31
34
} ;
@@ -36,6 +39,8 @@ export class ConfirmationModal extends HTMLElement {
36
39
37
40
this . dialogForm = selectOrError ( "form[method=dialog]" , this . dialog ) ;
38
41
this . dialogForm . addEventListener ( "submit" , this . onDialogFormSubmit ) ;
42
+
43
+ this . dialog . addEventListener ( "click" , event => event . stopPropagation ( ) ) ;
39
44
}
40
45
41
46
onDialogFormSubmit = ( event : SubmitEvent ) => {
You can’t perform that action at this time.
0 commit comments