From eae4d01158fd7be992fa762032ef1e3d9665024c Mon Sep 17 00:00:00 2001 From: Manuel Alvarez Alvarez Date: Thu, 19 Nov 2015 15:39:28 +0100 Subject: [PATCH 1/2] Add the decorator parameter to the handlers for the attach and detach the dropdown (otherwise the container is undefined) --- src/js/select2/dropdown/attachBody.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/select2/dropdown/attachBody.js b/src/js/select2/dropdown/attachBody.js index ece55417..d3f11ac4 100644 --- a/src/js/select2/dropdown/attachBody.js +++ b/src/js/select2/dropdown/attachBody.js @@ -80,7 +80,7 @@ define([ this.$dropdownContainer.detach(); }; - AttachBody.prototype._attachPositioningHandler = function (container) { + AttachBody.prototype._attachPositioningHandler = function (decorated, container) { var self = this; var scrollEvent = 'scroll.select2.' + container.id; @@ -107,7 +107,7 @@ define([ }); }; - AttachBody.prototype._detachPositioningHandler = function (container) { + AttachBody.prototype._detachPositioningHandler = function (decorated, container) { var scrollEvent = 'scroll.select2.' + container.id; var resizeEvent = 'resize.select2.' + container.id; var orientationEvent = 'orientationchange.select2.' + container.id; From a06a08a028afaa788db19987b5466afa8f48b715 Mon Sep 17 00:00:00 2001 From: Manuel Alvarez Alvarez Date: Thu, 19 Nov 2015 15:49:52 +0100 Subject: [PATCH 2/2] Fixed jshint errors due to too long lines on the attachBody adapter --- src/js/select2/dropdown/attachBody.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/select2/dropdown/attachBody.js b/src/js/select2/dropdown/attachBody.js index d3f11ac4..ec9fa437 100644 --- a/src/js/select2/dropdown/attachBody.js +++ b/src/js/select2/dropdown/attachBody.js @@ -80,7 +80,8 @@ define([ this.$dropdownContainer.detach(); }; - AttachBody.prototype._attachPositioningHandler = function (decorated, container) { + AttachBody.prototype._attachPositioningHandler = + function (decorated, container) { var self = this; var scrollEvent = 'scroll.select2.' + container.id; @@ -107,7 +108,8 @@ define([ }); }; - AttachBody.prototype._detachPositioningHandler = function (decorated, container) { + AttachBody.prototype._detachPositioningHandler = + function (decorated, container) { var scrollEvent = 'scroll.select2.' + container.id; var resizeEvent = 'resize.select2.' + container.id; var orientationEvent = 'orientationchange.select2.' + container.id;