[openstreetmap/openstreetmap-website] Image download with user feedback (PR #6192)

mmd notifications at github.com
Thu Jul 24 20:10:48 UTC 2025


@mmd-osm commented on this pull request.



> +    $("#export-image").on("turbo:submit-end", async function (event) {
+      if (event.detail.success) {
+        await handleExportSuccess(event.detail.fetchResponse);
+      } else {
+        await handleExportError(event);
+      }
+    });

I know this sounds a bit strange... with jquery-simulate in place, I have seen out of sequence calls to `this.delegate.formSubmissionFinished(this);` before our own `turbo:before-fetch-response` event handler has finished.

Now, with jquiery-simulate uninstalled and the respective code in history.js removed, I don't see this out of sequence calls anymore. I tested each case on Firefox and Chrome with consistent behavior.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6192/review/3053128735 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250724/e7951471/attachment.htm>


More information about the rails-dev mailing list