Skip to content

Commit 8ad3bbe

Browse files
committed
form-data-event: Don't close a modal within the submit handler. This should only be done via pat-modal's .close-panel CSS class handler.
1 parent c90651a commit 8ad3bbe

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/core/form-data-event.js

-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ parser.attribute = "data-form-data-event"; // do not require ``data-pat-``
99
parser.addArgument("event-name-submit");
1010
parser.addArgument("event-name-init");
1111
parser.addArgument("prevent-submit", true);
12-
parser.addArgument("close-modal", true);
1312

1413
export default Base.extend({
1514
name: "form-data-event",
@@ -46,12 +45,6 @@ export default Base.extend({
4645
detail: { form_data: form_data },
4746
});
4847
document.dispatchEvent(ev);
49-
if (this.options.closeModal) {
50-
const modal = this.el.closest(".pat-modal");
51-
if (modal) {
52-
modal["pattern-modal"].destroy();
53-
}
54-
}
5548
if (this.options.event["name-init"]) {
5649
document.removeEventListener(
5750
this.options.event["name-init"],

0 commit comments

Comments
 (0)