From cb9a90457867ffb14c7b1550bb67e872e0a5c2dd Mon Sep 17 00:00:00 2001 From: Yaron Uliel Date: Sat, 30 Jul 2016 19:23:25 +0300 Subject: [PATCH] Make tags matching case insensitive This closes https://github.com/select2/select2/issues/3566 This closes https://github.com/select2/select2/pull/4509 --- src/js/select2/data/tags.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/select2/data/tags.js b/src/js/select2/data/tags.js index db42faab..7bb45c94 100644 --- a/src/js/select2/data/tags.js +++ b/src/js/select2/data/tags.js @@ -53,7 +53,10 @@ define([ }, true) ); - var checkText = option.text === params.term; + var optionText = (option.text || '').toUpperCase(); + var paramsTerm = (params.term || '').toUpperCase(); + + var checkText = optionText === paramsTerm; if (checkText || checkChildren) { if (child) {