diff --git a/ietf/static/js/select2.js b/ietf/static/js/select2.js index 34611e1ef..153a11a10 100644 --- a/ietf/static/js/select2.js +++ b/ietf/static/js/select2.js @@ -66,6 +66,11 @@ window.setupSelect2Field = function (e) { .focus() }); + // Remove spurious title attribute (https://github.com/select2/select2/pull/3988) + $(document) + .on("mouseenter", ".select2-selection__rendered", function () { $(this) + .removeAttr("title"); }); + e.select2({ multiple: maxEntries !== 1, maximumSelectionSize: maxEntries, @@ -109,11 +114,4 @@ $(document) return; setupSelect2Field($(this)); }); - - // Remove spurious title attribute (https://github.com/select2/select2/pull/3988) - $(".select2-selection__rendered") - .hover(function () { - $(this) - .removeAttr("title"); - }); });