Skip to content

Commit

Permalink
Merge pull request #1213 from harvesthq/fix-scrollwheel-prototype
Browse files Browse the repository at this point in the history
Fix scroll issue in Prototype version
  • Loading branch information
pfiller committed May 16, 2013
2 parents 0058167 + 6dc024d commit fcaddb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chosen/chosen.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ Copyright (c) 2011 by Harvest
maxHeight = parseInt(this.search_results.getStyle('maxHeight'), 10);
visible_top = this.search_results.scrollTop;
visible_bottom = maxHeight + visible_top;
high_top = this.result_highlight.positionedOffset().top;
high_top = this.result_highlight.positionedOffset().top + this.search_results.scrollTop;
high_bottom = high_top + this.result_highlight.getHeight();
if (high_bottom >= visible_bottom) {
return this.search_results.scrollTop = (high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0;
Expand Down
Loading

0 comments on commit fcaddb8

Please sign in to comment.