From cab9b1c5e518d62ade3cef5e35d512aaecbd2e60 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 19 Dec 2022 17:01:06 +0200 Subject: [PATCH] fix: Remove spurious title attribute (#4917) --- ietf/static/js/select2.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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"); - }); });