From dea7979f119dbf59302f38b7b119b2952072d753 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 19 Feb 2013 12:19:27 +0400 Subject: [PATCH] TypeError: Cannot call method 'positionDropdown' of undefined --- select2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 71458e0d..c7e4c5c3 100644 --- a/select2.js +++ b/select2.js @@ -1129,12 +1129,13 @@ the specific language governing permissions and limitations under the Apache Lic // attach listeners to events that can change the position of the container and thus require // the position of the dropdown to be updated as well so it does not come unglued from the container + var that = this; this.container.parents().add(window).each(function () { $(this).bind(resize+" "+scroll+" "+orient, function (e) { $("#select2-drop-mask").css({ width:document.documentElement.scrollWidth, height:document.documentElement.scrollHeight}); - $("#select2-drop").data("select2").positionDropdown(); + that.positionDropdown(); }); });