[openstreetmap/openstreetmap-website] Image download w/ submit_tag (PR #6192)

mmd notifications at github.com
Mon Jul 14 16:52:06 UTC 2025


mmd-osm left a comment (openstreetmap/openstreetmap-website#6192)

I think what you describe is documented here: https://turbo.hotwired.dev/handbook/drive#form-submissions

_During a submission, Turbo Drive will set the “submitter” element’s [disabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled) attribute when the submission begins, then remove the attribute after the submission ends._

Somehow this last bit never worked when testing the new code.  If I don't manually remove the "disabled" attribute, it will remain disabled until I reload the page. I'm not exactly sure why is this. Maybe the POST + 302 Redirect + GET is treated differently? Otherwise, I'd agree that a properly working "turbo:submit-end" would be a bit pointless from a UX point of view.

I've also tried a `fetch` based approach where I have more control over the download. This turned out to be a bit trickier than expected, which is why I started with the current approach.



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

Message ID: <openstreetmap/openstreetmap-website/pull/6192/c3070274629 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250714/8c61820f/attachment.htm>


More information about the rails-dev mailing list