Skip to content

Commit

Permalink
Merge pull request #225 from jakob-lundberg/master
Browse files Browse the repository at this point in the history
Parse value to int instead of finding '0's in the string
  • Loading branch information
leocaseiro authored Nov 21, 2016
2 parents e99e0d1 + 2841987 commit 1b96e98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/angular-chosen.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
var defaultText, dropListDom;
if (chosen) {
dropListDom = $(element.parent()).find("div.chosen-drop");
if (dropListDom && dropListDom.length > 0 && dropListDom.css("left").indexOf("0") >= 0) {
if (dropListDom && dropListDom.length > 0 && parseInt(dropListDom.css("left")) >= 0) {
return;
}
return element.trigger('chosen:updated');
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-chosen.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/chosen.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ angular.module('localytics.directives').directive 'chosen', ['$timeout', ($timeo
if chosen
# Fix #56 Don't scroll to top when selecting multiple items with ctrl
dropListDom = $(element.parent()).find("div.chosen-drop") #uses jQuery instead of Angular.
if dropListDom && dropListDom.length > 0 && dropListDom.css("left").indexOf("0") >= 0
if dropListDom && dropListDom.length > 0 && parseInt(dropListDom.css("left")) >= 0
return
return element.trigger('chosen:updated')
else
Expand Down

0 comments on commit 1b96e98

Please sign in to comment.