-
Notifications
You must be signed in to change notification settings - Fork 27.4k
mouseleave not caught in certain situations #12703
Comments
This affects mouseenter as well: http://plnkr.co/edit/gcH7D94xe0KjyTH8usF2?p=preview jqLite and jQuery substitute mouseenter with mouseover and mouseleave with mouseout. Most browsers do not support mouse events on disabled form elements, Mozilla fixed that bug a few days ago in the upcoming Firefox Version 44. |
@gkalpak - didn't you and I spend some time on mouseenter, mouseleave events recently? Fancy investigating this one? |
Yes and yes :) |
@wesleycho, @PerfectPixel, I can't reproduce the issue using your demos (tried on Chrome 47 and Firefox 42 on Windows). What OS/browser/versions are you seeing this ? |
@gkalpak OS X 10.11.1 with Chrome 47 / Firefox 42 In order to reproduce the issue, enter/leave the red boxed with your mouse by moving over the disabled checkbox. My guess is, that this is related to browser issues: https://bugzilla.mozilla.org/show_bug.cgi?id=218093 |
I see the problem now :) Thx ! It seems to be (related to) a browser issue indeed. (Here is the bug-report for Chromium, btw.) So, I am not sure how quickly the underlying browser bugs will be addressed on all supporting browsers and having a work-around (if possible) until then would be nice. On the other hand, jQuery has the same behaviour and (based on the discussion on this issue), there doesn't seem to be an easy and safe way out. |
Safari has the same issue. I agree that there is no easy fix. And I guess there won't be quick fixes on the browser side, the firefox bug received its fix after 12 years... :-( |
I think it's a can't fix from our side, especially that jQuery has worked that way for ages as well. Closing. |
There are certain situations where jqLite does not appropriately fire the mouseleave event when the element has a disabled child element - here is a demonstration of the difference between listening on the DOM event and the jqLite event.
It should be noted that this is how jQuery handles it, but this is probably an incorrect implementation in jQuery IMO - jQuery should not swallow the event and prevent it from being propagated.
The text was updated successfully, but these errors were encountered: