-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isolated scroll #1155
Isolated scroll #1155
Conversation
… elasticsales-isolated-scroll Conflicts: chosen/chosen.jquery.js chosen/chosen.jquery.min.js chosen/chosen.proto.js chosen/chosen.proto.min.js
@@ -48,6 +48,18 @@ class Chosen extends AbstractChosen | |||
else | |||
container_div.html '<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>' + @default_text + '</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>' | |||
|
|||
container_div.find('.chzn-results').bind 'mousewheel DOMMouseScroll', (evt) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this like this? We assign a variable a few lines later that cache's the results: @search_results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: is there some reason event handlers aren't in register_observers
?
I think the functionality is worthwhile, but this is not ready to merge as-is. The code is not consistent with the rest of Chosen's stye at all. |
There are differences in the way the Firefox and all other browsers handle mousewheel events. There are two handlers to take care of this.
@pfiller It turns out that Firefox listens for the event |
I didn't test in IE, but the implementation seems solid. I'm sold. |
Conflicts: chosen/chosen.jquery.min.js chosen/chosen.proto.min.js coffee/chosen.jquery.coffee
@stof @wojcikstefan I've got it working in IE now. I would have just used that implementation on all browsers but it's pretty janky in FireFox
Thoughts?
This is a merge of PR #1122
cc: @pfiller