prvshkmrin left a comment (openstreetmap/openstreetmap-website#6598)

I reproduced the issue locally and traced it to how the language selector modal 
behaves when the user presses **Enter**.
**Key detail:** this only affects **logged-in** users.  


In that case, the modal loads a `<form>` inside the Turbo Frame 
(`select_language_list`) that submits to `basic_preferences_path` (PUT). 
Pressing Enter triggers an unintended form submission.
**What goes wrong:**  
- The response isn’t Turbo-frame-compatible, so Turbo can’t replace the 
`select_language_list` frame.  
- The frame stays stuck on the spinner.  
- Reopening the modal shows the spinner again because the frame never received 
valid content.  
For logged-out users, there is no form, so Enter does nothing.


**Sequence:**  
1. Open modal → Turbo loads normally  
2. Press Enter → unintended form submit  
3. Turbo can’t update the frame → infinite spinner  
4. Only a full reload resets it  


I can work on a fix — likely preventing Enter from submitting the form inside 
the modal or ensuring the response properly replaces the Turbo Frame.


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

Message ID: 
<openstreetmap/openstreetmap-website/issues/6598/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to