Преглед на файлове

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.
Kevin Brown преди 10 години
родител
ревизия
db7cd1b373
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      select2.js

+ 3 - 3
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();