Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

mouseleave not caught in certain situations #12703

Closed
wesleycho opened this issue Aug 30, 2015 · 8 comments
Closed

mouseleave not caught in certain situations #12703

wesleycho opened this issue Aug 30, 2015 · 8 comments

Comments

@wesleycho
Copy link
Contributor

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.

@PerfectPixel
Copy link

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.

@petebacondarwin
Copy link
Contributor

@gkalpak - didn't you and I spend some time on mouseenter, mouseleave events recently? Fancy investigating this one?

@gkalpak
Copy link
Member

gkalpak commented Dec 7, 2015

Yes and yes :)

@gkalpak
Copy link
Member

gkalpak commented Dec 8, 2015

@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 ?

@PerfectPixel
Copy link

@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

@gkalpak
Copy link
Member

gkalpak commented Dec 8, 2015

I see the problem now :) Thx !

It seems to be (related to) a browser issue indeed. (Here is the bug-report for Chromium, btw.)
It's been fixed on Firefox 44, IE11 seems to work correctly, but it's not fixed in Chrome and although people have reported it working correctly on Edge, it didn't work for me. I don't know about Safari.

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.

@PerfectPixel
Copy link

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... :-(

@mgol
Copy link
Member

mgol commented Mar 28, 2018

I think it's a can't fix from our side, especially that jQuery has worked that way for ages as well. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants