Skip to content

Commit

Permalink
Prevent removing textarea.form.submit handler with opts.leaveSubmitMe…
Browse files Browse the repository at this point in the history
…thodAlone
  • Loading branch information
Mark-H authored and marijnh committed Aug 25, 2019
1 parent a34b8b3 commit 399d430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/edit/fromTextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function fromTextArea(textarea, options) {
textarea.style.display = ""
if (textarea.form) {
off(textarea.form, "submit", save)
if (typeof textarea.form.submit == "function")
if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function")
textarea.form.submit = realSubmit
}
}
Expand Down

0 comments on commit 399d430

Please sign in to comment.