Skip to content

Commit 3f43f45

Browse files
committed
Testing if the dropdown is opened before call positionDropdown, on events by resize, scroll and orientation
1 parent 60d74da commit 3f43f45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ the specific language governing permissions and limitations under the Apache Lic
13901390
var that = this;
13911391
this.container.parents().add(window).each(function () {
13921392
$(this).on(resize+" "+scroll+" "+orient, function (e) {
1393-
that.positionDropdown();
1393+
if (!that.opened()) that.positionDropdown();
13941394
});
13951395
});
13961396

0 commit comments

Comments
 (0)