fix flash and morph

This commit is contained in:
Pete Matsyburka committed 2026-09-23 11:00:17 +03:00
1 parent 8723ce7f7a
commit 061580594c
5 files changed
+61 -6

No files matched your search

+2 -1
View File
@@ -9,7 +9,8 @@ export default class extends HTMLElement {
}
onSubmit = (e) => {
if (!e.detail.success || e.detail.fetchResponse?.redirected) return
if (!e.detail.success) return
if (e.detail.fetchResponse?.redirected && e.detail.fetchResponse.location.href !== window.location.href) return
if (e.detail.formSubmission?.formElement?.method === 'get') return
if (this.dataset.closeAfterSubmit === 'false') return
if (e.detail.formSubmission?.formElement?.dataset?.closeOnSubmit === 'false') return