Skip to content

Commit

Permalink
Fix keydown_arrow method in Prototype version.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfiller committed Jun 7, 2013
1 parent d27f25e commit 64bbd19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions chosen/chosen.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,13 +1006,13 @@ Copyright (c) 2011 by Harvest
};

Chosen.prototype.keydown_arrow = function() {
var nexts, sibs;
var next_sib;

if (this.results_showing && this.result_highlight) {
sibs = this.result_highlight.nextSiblings();
nexts = sibs.intersect(actives);
if (nexts.length) {
return this.result_do_highlight(nexts.first());
next_sib = this.result_highlight.next('.active-result');
if (next_sib) {
console.dir(next_sib);
return this.result_do_highlight(next_sib);
}
} else {
return this.results_show();
Expand Down
Loading

2 comments on commit 64bbd19

@ylabonte
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

this fix does not work for me. I'm using the prototype version at its latest revision (master branch). Tested browsers are Firefox (v21.0) and Chromium (Version 25.0.1364.160 Ubuntu 13.04). I've also tried some older Chosen revisions, but the problem remains the same.

As long as the mouse does not touch the inner area of the select box, nothing happens. I can grab the scroll bar or use the mouse wheel normally (WHEN leaving the cursor over the scrollbar!). But the moment, the cursor hits a list element (select option), the list immediately jumps to its end.

I have uploaded a very simple example at http://www.socovero.de/chosen-scroll-bug/

@pfiller
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @socovero. This is fixed in the latest master.

Please sign in to comment.