Skip to content

Commit

Permalink
composed events
Browse files Browse the repository at this point in the history
  • Loading branch information
TomK committed Jul 6, 2021
1 parent d26fe8c commit 4c44853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@packaged-ui/modal",
"version": "1.2.3",
"version": "1.3.0",
"repository": "[email protected]:packaged-ui/modal.git",
"author": "Tom Kay <[email protected]>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions src/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default class Modal
i =>
{
const id = i.getAttribute('id');
if(i.matches('.modal__content') || (document.querySelectorAll(`[modal-launcher="${id}"],[modal-closer="${id}"]`).length > 0))
if(i.matches('.modal__content') || (document.querySelectorAll(`[modal-launcher="${id}"], [modal-closer="${id}"]`).length > 0))
{
Modal.create(i);
}
Expand Down Expand Up @@ -238,7 +238,7 @@ function _getDebounceFn(modal)

function _getEvent(eventName, modal, cancelable = false)
{
return new CustomEvent(eventName, {detail: {modal}, cancelable: cancelable, bubbles: true});
return new CustomEvent(eventName, {detail: {modal}, cancelable: cancelable, bubbles: true, composed: true});
}

document.addEventListener(
Expand Down

0 comments on commit 4c44853

Please sign in to comment.