@prvshkmrin commented on this pull request.


> @@ -12,3 +12,14 @@ $(document).on("click", "#select_language_dialog 
> [data-language-code]", function
     location.reload();
   }
 });
+
+// Prevent accidental Enter key submits inside the language dialog
+$(document).on("keydown", "#select_language_dialog", function (e) {
+  if (e.key === "Enter" || e.keyCode === 13) {

Thanks for pointing that out — you're right, `keyCode` is deprecated and 
shouldn't be introduced here.

I’ll update the PR to remove the `keyCode` check and switch to using 
`event.key`, which is the recommended modern approach.

Thanks for the guidance!


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

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

Reply via email to