@HolgerJeromin 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) {
We should not introduce handling `keyCode`.
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6599#pullrequestreview-3554401304
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