From 9207f2307398daa60bbc7c1836d7dd5184edf88c Mon Sep 17 00:00:00 2001 From: Oshane Bailey Date: Tue, 26 Aug 2014 21:45:36 -0500 Subject: [PATCH] Fixed JS breakage due to undefined variable, viewPortLeft. --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index c1fa6f11..efca8d82 100644 --- a/select2.js +++ b/select2.js @@ -1244,7 +1244,7 @@ the specific language governing permissions and limitations under the Apache Lic return dropLeft + dropWidth <= viewPortRight; }, enoughRoomOnLeft = function() { - return offset.left + viewPortLeft + container.outerWidth(false) > dropWidth; + return offset.left + viewPortRight + container.outerWidth(false) > dropWidth; }, aboveNow = $dropdown.hasClass("select2-drop-above"), bodyOffset, @@ -3237,7 +3237,7 @@ the specific language governing permissions and limitations under the Apache Lic if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) { current.splice(i, 1); if(i>0){ - i--; + i--; } old.splice(j, 1); j--;