Skip to content

Commit 36c0c36

Browse files
committed
fix(pat autosubmit): Trigger the submit event with the correct submitter property.
This resp. the previous commit in event.js fixes a problem where the submitter was the added to the browser automatically and could lead to incorrect form submission data in combination with pat-ajax. E.g. we had a case where for a file upload the delete button's value was submitted, where it shouldn't have.
1 parent 2e6b7e5 commit 36c0c36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pat/auto-submit/auto-submit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default Base.extend({
128128

129129
onInputChange(e) {
130130
e.stopPropagation();
131-
this.el.dispatchEvent(events.submit_event());
131+
this.el.dispatchEvent(events.submit_event({ submitter: e.target }));
132132
log.debug("triggered by " + e.type);
133133
},
134134
});

0 commit comments

Comments
 (0)