]> git.openstreetmap.org Git - rails.git/commit
Fix social link form resubmission after removing invalid link (#6945)
authorMatt Van Horn <mvanhorn@users.noreply.github.com>
Wed, 5 Aug 2026 06:21:56 +0000 (23:21 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Aug 2026 06:21:56 +0000 (08:21 +0200)
commit077aa58dbd2fed37c3cfcbe62ceab0d753ee1f3a
tree5e2df69172b9bd34ef7fa75cbdfb566b0bc35209
parentdc2740d1adc1ede57bb0f045ad728e5bed553471
Fix social link form resubmission after removing invalid link (#6945)

When a social link with validation errors is removed via the "Remove"
button, the row is hidden with d-none but the input retains its
required attribute. This prevents form submission because HTML5
validation rejects hidden required fields that cannot be focused.

Strip the required attribute from the text input when marking a social
link for destruction so the form can be resubmitted.

Closes #6903
app/assets/javascripts/user.js
test/system/profile_links_change_test.rb