@mmd-osm 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");

Good idea, I also thought about this before. `.focus()` is deprecated,  I'm 
using `.trigger("focus")` instead now.

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

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

Reply via email to