[openstreetmap/openstreetmap-website] Remove required attribute from social link fields marked for destruction (PR #6937)

Alex Towell notifications at github.com
Wed Mar 25 18:38:17 UTC 2026


queelius left a comment (openstreetmap/openstreetmap-website#6937)

I reviewed the code. The fix is three lines of jQuery in two places.

When a social link row is marked for destruction, bootstrap_form's `required` attribute stays on the hidden text input. The browser then blocks submission because it can't focus a hidden required field.

The click handler (line 24) strips `required` when the user clicks Remove. The page-load block (lines 33-35) does the same for rows where `_destroy` is already checked after a failed validation re-render. Both paths hide the row, both need to clear the validation constraint.

I should have ticked the manual verification checkbox and turned off the Copilot review. That was sloppy on my part, sorry about that.

For context, I work part-time for IDOT (Illinois DOT) and have tried to use OpenStreetMap for transportation work there. I care about this project beyond just this PR.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6937?email_source=notifications&email_token=AAK2OLOHJXKA2UYJJZCX25T4SQRRTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJSHA4DQNZVGYZKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOS2XA4S7MNXW23LFNZ2F633QMVXF6Y3MNFRWW#issuecomment-4128887562
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6937/c4128887562 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260325/91417b70/attachment.htm>


More information about the rails-dev mailing list