Skip to content

Commit 8460e83

Browse files
committed
Merge pull request select2#2642 from b4oshany/master
Fixed JS breakage due to undefined variable, viewPortLeft.
2 parents 2a9db24 + 9207f23 commit 8460e83

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

select2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ the specific language governing permissions and limitations under the Apache Lic
12441244
return dropLeft + dropWidth <= viewPortRight;
12451245
},
12461246
enoughRoomOnLeft = function() {
1247-
return offset.left + viewPortLeft + container.outerWidth(false) > dropWidth;
1247+
return offset.left + viewPortRight + container.outerWidth(false) > dropWidth;
12481248
},
12491249
aboveNow = $dropdown.hasClass("select2-drop-above"),
12501250
bodyOffset,
@@ -3237,7 +3237,7 @@ the specific language governing permissions and limitations under the Apache Lic
32373237
if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {
32383238
current.splice(i, 1);
32393239
if(i>0){
3240-
i--;
3240+
i--;
32413241
}
32423242
old.splice(j, 1);
32433243
j--;

0 commit comments

Comments
 (0)