Skip to content

Commit dea7979

Browse files
committed
TypeError: Cannot call method 'positionDropdown' of undefined
1 parent 6278e7c commit dea7979

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

select2.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,12 +1129,13 @@ the specific language governing permissions and limitations under the Apache Lic
11291129

11301130
// attach listeners to events that can change the position of the container and thus require
11311131
// the position of the dropdown to be updated as well so it does not come unglued from the container
1132+
var that = this;
11321133
this.container.parents().add(window).each(function () {
11331134
$(this).bind(resize+" "+scroll+" "+orient, function (e) {
11341135
$("#select2-drop-mask").css({
11351136
width:document.documentElement.scrollWidth,
11361137
height:document.documentElement.scrollHeight});
1137-
$("#select2-drop").data("select2").positionDropdown();
1138+
that.positionDropdown();
11381139
});
11391140
});
11401141

0 commit comments

Comments
 (0)