[openstreetmap/openstreetmap-website] Add unsaved changes warning to message and diary forms (PR #7076)

Tom Hughes notifications at github.com
Sun May 10 07:38:21 UTC 2026


@tomhughes commented on this pull request.



> @@ -0,0 +1,48 @@
+(function () {
+  function beforeUnloadListener(event) {
+    event.preventDefault();
+    // Legacy support for older browsers.
+    event.returnValue = true;
+  };
+
+  // A function that adds a `beforeunload` listener if there are unsaved changes.

Do we have any history of using jsdoc comments? I'm not sure it's reasonable to suddenly start demanding them if we haven't normally used them...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7076#discussion_r3214512477
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7076/review/4259082713 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260510/b6acbb8f/attachment-0001.htm>


More information about the rails-dev mailing list