Browse Source

Avoid call 'positionDropdown' function if the container it's closed

Eduardo Matos 11 years ago
parent
commit
22d503f846
1 changed files with 1 additions and 1 deletions
  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;
             var that = this;
             this.container.parents().add(window).each(function () {
             this.container.parents().add(window).each(function () {
                 $(this).on(resize+" "+scroll+" "+orient, function (e) {
                 $(this).on(resize+" "+scroll+" "+orient, function (e) {
-                    if (!that.opened()) that.positionDropdown();
+                    if (that.opened()) that.positionDropdown();
                 });
                 });
             });
             });