-
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
mouseleave event handler returns false and prevents event propagation #1055
Comments
Ok I get the 'why' now. It's the default Coffescript behavior to return the last expression from the function. You have to manually opt-out return values in Coffescript. Thus to resolve the issue, in abstract-chosen.coffee add a "return" to specify to return undefined. This probably should be applied to other event handlers as well. mouse_leave: -> @mouse_on_container = false; return If you guys will accept a pull request I'm happy to make the change. |
yeah, please send a PR doing it for all event handlers to avoid issues |
Better container reference #1151 Fix issue when destroying last choice #1149 Use selectedIndex for tracking change events. #1147 Better IE Disabling #1144 Dropdown use css positioning for top position #1143 Fix bug when deleting last item #1142 Percentage Width Support #1141 CSS Centering Fix #1120 Use New CoffeeScript #1125 Chosen License #1111 Update placeholder text with ``liszt:updated`` #1107 Fix strange event bubbling #1055
Fighting with this in 0.9.11 (jQuery). Why does chosen need to "return _this.mouse_leave(evt);" from the mouseleave event handler setup in Chosen.prototype.register_observers? The result is always false, due to:
This causes jQuery to StopPropagation, thus any parent elements will not get their mouseleave invoked. This is causing me grief (tooltip sort of stuff, FWIW).
If I eliminate the "return" then everything is cool. I'm scratching my head trying to figure out why its there to begin with. Can someone fix this? Or if it's as-designed please help me understand the purpose.
The text was updated successfully, but these errors were encountered: