Skip to content
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

iamnoah
Copy link
Contributor

@iamnoah 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.

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
Copy link
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
Copy link
Contributor Author

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
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants