@pablobm commented on this pull request.
> +
+ if ($search.length) {
+ $search.off("input");
+ $search.on("input", function () {
+ const query = $(this).val().toLowerCase();
+ $(".language-item").each(function () {
+ const text = $(this).text().toLowerCase();
+ $(this).toggle(text.indexOf(query) > -1);
+ });
+ });
+ }
+ }
+ });
+
+ $("#select_language_dialog").on("shown.bs.modal", function () {
+ $("#language_search").val("").trigger("input");
Would it make sense to grab the focus so that the user can start typing
straightaway?
```suggestion
$("#language_search")
.focus()
.val("").trigger("input");
```
(I'm not an accessibility expert, so I might be proposing an a11y sin here).
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6412#pullrequestreview-3263502205
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6412/review/3263502...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev