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

cyclePause might become -1, which reverses "pause on hover" #156

Open
blueyed opened this issue Sep 4, 2013 · 3 comments
Open

cyclePause might become -1, which reverses "pause on hover" #156

blueyed opened this issue Sep 4, 2013 · 3 comments

Comments

@blueyed
Copy link

blueyed commented Sep 4, 2013

Under certain circumstances cyclePause might become negative and then the check ! cyclePause considers it not being paused.

In my use case, I am pausing the cycle plugin (cycle("pause")), when a video is being played in the slider.
This interferes with the pause option to pause/resume on mouseenter/mouseleave. This is why I bind the same events on all child elements, and stop propagation of the event to the upper cycle container:

$('#slides-wrapper *').bind('mouseenter.cycle mouseleave.cycle', function(e) {
    e.stopPropagation();
    return false;
});

I am proposing a fix for this (also mentioned in issue #44).

I am not sure, if cyclePause needs to be something else than 0/1 to make the "pause on hover" work properly. If so, this should get documented in the code and another fix needs to be made for this.

blueyed added a commit to blueyed/cycle that referenced this issue Sep 4, 2013
@malsup
Copy link
Owner

malsup commented Sep 4, 2013

Are you using the latest code?

@blueyed
Copy link
Author

blueyed commented Sep 11, 2013

Yes.

@blueyed
Copy link
Author

blueyed commented Sep 25, 2013

I just noticed that my patch will cause the plugin to resume on mouseenter/-leave, if "pause on hover" is being used, after the "pause" action has been called manually.
In this case mouseenter/-leave should not resume it.

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

No branches or pull requests

2 participants