Skip to content

Commit 8b463bf

Browse files
committed
Merge pull request select2#2287 from eduardojmatos/master
Testing if the dropdown is opened before call positionDropdown
2 parents 1c7706a + 22d503f commit 8b463bf

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
@@ -1396,7 +1396,7 @@ the specific language governing permissions and limitations under the Apache Lic
13961396
var that = this;
13971397
this.container.parents().add(window).each(function () {
13981398
$(this).on(resize+" "+scroll+" "+orient, function (e) {
1399-
that.positionDropdown();
1399+
if (that.opened()) that.positionDropdown();
14001400
});
14011401
});
14021402

0 commit comments

Comments
 (0)