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

Force hover leave on new mouseenter. Fixes #63 and #64. #65

Merged
merged 1 commit into from Feb 6, 2013

Conversation

Projects
None yet
2 participants
@iamnoah
Contributor

iamnoah commented Dec 5, 2012

We've had some terrible problems with the hover plugin getting locked up and never initiating new hover events. This is really bad for our app because some critical controls only show on hover. THe only way to get them back was to reload the page. So we came up with a failsafe behavior.

If the mouse has entered a new element, this change forces the hoverleave event to fire on the previously hovered element (after the correct hover leave time), even if no mouseleave event fires.

The mouseleave event will not fire if the element is removed while hovered and possibly in other circumstances.

Force hover leave on new mouseenter. Fixes #63 and #64.
If the mouse has entered a new element, this change forces the hoverleave event to fire on the previously hovered element, even if no mouseleave event fires.

The mouseleave event will not fire if the element is removed while hovered and possibly in other circumstances.
@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Dec 10, 2012

Contributor

Thanks! Looks good, but do you have an idea how to test this? I can probably merge it in and see if we can make some FuncUnit tests that cover it.

Contributor

daffl commented Dec 10, 2012

Thanks! Looks good, but do you have an idea how to test this? I can probably merge it in and see if we can make some FuncUnit tests that cover it.

@iamnoah

This comment has been minimized.

Show comment
Hide comment
@iamnoah

iamnoah Dec 10, 2012

Contributor

Here's a demo of the problem: http://jsfiddle.net/qAFSX/3/

So, hover an element, verify it gets updated. Remove the hovered element and try to hover another element with the same class. It should update but doesn't without this patch.

Contributor

iamnoah commented Dec 10, 2012

Here's a demo of the problem: http://jsfiddle.net/qAFSX/3/

So, hover an element, verify it gets updated. Remove the hovered element and try to hover another element with the same class. It should update but doesn't without this patch.

daffl added a commit that referenced this pull request Feb 6, 2013

Merge pull request #65 from Spredfast/fix-hoverleave
Force hover leave on new mouseenter. Fixes #63 and #64.

@daffl daffl merged commit e86776a into bitovi:master Feb 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment