From 2690053010f8e510c4ca838800c2e780675d0bc1 Mon Sep 17 00:00:00 2001 From: Siegfried Bilstein Date: Sat, 21 Jun 2014 11:36:48 -0700 Subject: [PATCH] Fixes #2434 Tagging support allows creation of tags that are only whitespace --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index f904d621..7a425e8e 100644 --- a/select2.js +++ b/select2.js @@ -2953,7 +2953,7 @@ the specific language governing permissions and limitations under the Apache Lic // multi onSelect: function (data, options) { - if (!this.triggerSelect(data)) { return; } + if (!this.triggerSelect(data) || data.text === "") { return; } this.addSelectedChoice(data);