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

Testing if the dropdown is opened before call positionDropdown, on events by resize, scroll and orientation

Eduardo Matos преди 11 години
родител
ревизия
3f43f459e9
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1390,7 +1390,7 @@ the specific language governing permissions and limitations under the Apache Lic
             var that = this;
             this.container.parents().add(window).each(function () {
                 $(this).on(resize+" "+scroll+" "+orient, function (e) {
-                    that.positionDropdown();
+                    if (!that.opened()) that.positionDropdown();
                 });
             });