Skip to content

Commit

Permalink
Merge pull request #1 from webkinder/fix/close
Browse files Browse the repository at this point in the history
Fix closing
  • Loading branch information
silvanarnet authored May 12, 2023
2 parents 3518e20 + 9277b87 commit 06b2bbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const MicroModal = (() => {
}

onClick (event) {
if (event.target.hasAttribute(this.config.closeTrigger)) {
if (event.target.closest(`[${ this.config.closeTrigger }]`)) {
this.closeModal(event)
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@micromodal/repo",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"private": true,
"workspaces": [
Expand Down

0 comments on commit 06b2bbe

Please sign in to comment.