[openstreetmap/openstreetmap-website] Language selection enhancements (PR #6412)
mmd
notifications at github.com
Wed Sep 24 18:04:28 UTC 2025
@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/3264086612 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250924/d19648b2/attachment.htm>
More information about the rails-dev
mailing list