From db7cd1b373f9a2a743a68ce32cc59dc8fc899eb8 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Sat, 1 Nov 2014 14:28:22 -0400 Subject: [PATCH] Go back to hiding the original element This was only done to maintain compatibility with labels, back when we could capture the focus events from the original element. Now that we handle them in a different way, this is no longer needed. This fixes #2769. --- select2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/select2.js b/select2.js index 5591ea9d..b66a2d49 100644 --- a/select2.js +++ b/select2.js @@ -871,7 +871,7 @@ the specific language governing permissions and limitations under the Apache Lic select2.liveRegion.remove(); select2.dropdown.remove(); element - .removeClass("select2-offscreen") + .show() .removeData("select2") .off(".select2") .prop("autofocus", this.autofocus || false); @@ -2273,7 +2273,7 @@ the specific language governing permissions and limitations under the Apache Lic })); this.initContainerWidth(); - this.opts.element.addClass("select2-offscreen"); + this.opts.element.hide(); this.setPlaceholder(); }, @@ -2856,7 +2856,7 @@ the specific language governing permissions and limitations under the Apache Lic })); this.initContainerWidth(); - this.opts.element.addClass("select2-offscreen"); + this.opts.element.hide(); // set the placeholder if necessary this.clearSearch();