[openstreetmap/openstreetmap-website] Changeset comment text is lost when switching entity pages (Issue #4561)

Holger Jeromin notifications at github.com
Wed Mar 6 10:08:15 UTC 2024


Solution: Add conditionally a `beforeunload` handler. But beware of this:

> Important: the beforeunload event should only be used to alert the user of unsaved changes. Once those changes are saved, the event should be removed. It should never be added unconditionally to the page, as doing so can hurt performance in some cases. 

https://developer.chrome.com/docs/web-platform/page-lifecycle-api#the_beforeunload_event


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4561#issuecomment-1980513113
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/4561/1980513113 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240306/e720a60b/attachment.htm>


More information about the rails-dev mailing list