Skip to content

Commit

Permalink
fix bad patch
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor committed Jan 11, 2021
1 parent 90764c6 commit 840c5e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/dialog-polyfill.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ function findFormSubmitter(event) {
}

var submitter = dialogPolyfill.formSubmitter;
if (!submitter || submitter.form !== form) {
if (!submitter) {
var target = event.target;
var root = ('getRootNode' in target && target.getRootNode() || document);
submitter = root.activeElement;
}

if (submitter.form !== form) {
if (!submitter || submitter.form !== form) {
return null;
}
return submitter;
Expand Down
4 changes: 2 additions & 2 deletions dist/dialog-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@
}

var submitter = dialogPolyfill.formSubmitter;
if (!submitter || submitter.form !== form) {
if (!submitter) {
var target = event.target;
var root = ('getRootNode' in target && target.getRootNode() || document);
submitter = root.activeElement;
}

if (submitter.form !== form) {
if (!submitter || submitter.form !== form) {
return null;
}
return submitter;
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ function findFormSubmitter(event) {
}

var submitter = dialogPolyfill.formSubmitter;
if (!submitter || submitter.form !== form) {
if (!submitter) {
var target = event.target;
var root = ('getRootNode' in target && target.getRootNode() || document);
submitter = root.activeElement;
}

if (submitter.form !== form) {
if (!submitter || submitter.form !== form) {
return null;
}
return submitter;
Expand Down

0 comments on commit 840c5e5

Please sign in to comment.