Skip to content

Commit

Permalink
Fix event target
Browse files Browse the repository at this point in the history
  • Loading branch information
rynpsc committed Sep 21, 2020
1 parent baf90d9 commit bd63395
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.1.1 - 2020-09-21

### Fixed

- Fixed issue with incorrect event target when using domapi.

## 4.1.0 - 2020-09-18

### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/dom-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function unmount() {
}

function open(event) {
let instance = getInstanceById(event.target.dataset.dialogOpen);
let instance = getInstanceById(event.currentTarget.dataset.dialogOpen);

if (instance) {
instance.open();
Expand All @@ -29,7 +29,7 @@ function open(event) {
}

function close(event) {
let instance = getInstanceById(event.target.dataset.dialogClose);
let instance = getInstanceById(event.currentTarget.dataset.dialogClose);

if (instance) {
instance.close();
Expand Down

0 comments on commit bd63395

Please sign in to comment.