Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WCM-423: Ensure changed inlineforms are saved before leaving the page #997

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

wosc
Copy link
Member

@wosc wosc commented Jan 24, 2025

Wenn ich das Tab schließe, funktioniert das recht prima so. Aber wenn ich auf einen Link klicke (Quelltext-Reiter, Einchecken o.ä.) wird die Lightbox erst angezeigt, nachdem der Browserdialog wieder vorbei ist -- was den Sinn zerstört, dem Benutzer anzuzeigen, warum dieser Dialog ihn hier grade anspringt. Kann man den Browser irgendwie dazu bringen, den DOM zuverlässig zu aktualisieren, damit die Lightbox auch in diesen Fällen schonmal "hinter" dem Dialog angezeigt wird?

(Zum lokal Testen in die zeit.cms.content:feature-toggle.xml sich <inlineform_save_beforeunload>true</inlineform_save_beforeunload> reinschreiben)

@wosc wosc requested a review from adrian-zon January 24, 2025 12:56
@adrian-zon
Copy link
Contributor

Ich denke, da lässt sich nichts machen, siehe zb https://stackoverflow.com/questions/38788375/altering-dom-in-beforeunload-in-chrome. Was aber ginge, wäre, in beforeunload die Formulare mit sendBeacon zu speichern (form.form.submit_via_js(null, true) und zeit.cms.SubPageForm.submit erweitern zu function(action, useSendBeacon) { /* … */ })

@wosc wosc force-pushed the WCM-423-beforeunload branch from 2b8c35f to a2c9a22 Compare January 27, 2025 08:15
@wosc
Copy link
Member Author

wosc commented Jan 27, 2025

Danke fürs Recherchieren! Und schade... ich glaub, sendBeacon ist mir zu implizit an der Stelle. Ich zeig die beforeunload-UX (wie sie jetzt halt ist) dann mal Sonja, ob man das trotzdem so machen kann.

@wosc wosc merged commit 407f415 into main Jan 27, 2025
4 checks passed
@wosc wosc deleted the WCM-423-beforeunload branch January 27, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants