<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/132164321?s=20&v=4" /><strong>prvshkmrin</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/issues/6598#issuecomment-3628471928">(openstreetmap/openstreetmap-website#6598)</a></div>
<p dir="auto">I reproduced the issue locally and traced it to how the language selector modal behaves when the user presses <strong>Enter</strong>.<br>
<strong>Key detail:</strong> this only affects <strong>logged-in</strong> users.</p>
<p dir="auto">In that case, the modal loads a <code class="notranslate"><form></code> inside the Turbo Frame (<code class="notranslate">select_language_list</code>) that submits to <code class="notranslate">basic_preferences_path</code> (PUT). Pressing Enter triggers an unintended form submission.<br>
<strong>What goes wrong:</strong></p>
<ul dir="auto">
<li>The response isn’t Turbo-frame-compatible, so Turbo can’t replace the <code class="notranslate">select_language_list</code> frame.</li>
<li>The frame stays stuck on the spinner.</li>
<li>Reopening the modal shows the spinner again because the frame never received valid content.<br>
For logged-out users, there is no form, so Enter does nothing.</li>
</ul>
<p dir="auto"><strong>Sequence:</strong></p>
<ol dir="auto">
<li>Open modal → Turbo loads normally</li>
<li>Press Enter → unintended form submit</li>
<li>Turbo can’t update the frame → infinite spinner</li>
<li>Only a full reload resets it</li>
</ol>
<p dir="auto">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.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/6598#issuecomment-3628471928">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMRLOKOIA6EHUU22ZT4AW7WFAVCNFSM6AAAAACOMH2ZMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMRYGQ3TCOJSHA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIK5VFFDTVCGYEPDDD4AW7WFA5CNFSM6AAAAACOMH2ZMCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTWYIYLHQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/6598/3628471928</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/6598#issuecomment-3628471928",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/6598#issuecomment-3628471928",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>