From 22d503f8461ce5d47776f7676c833a0adf4c0de1 Mon Sep 17 00:00:00 2001 From: Eduardo Matos Date: Tue, 15 Apr 2014 10:51:23 -0300 Subject: [PATCH] Avoid call 'positionDropdown' function if the container it's closed --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 9a927dc4..e6406950 100644 --- a/select2.js +++ b/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) { - if (!that.opened()) that.positionDropdown(); + if (that.opened()) that.positionDropdown(); }); });