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

Joystick is not released when moved out of the window only chrome and IE #57

Closed
sharath1512 opened this issue Aug 21, 2017 · 7 comments
Closed
Labels

Comments

@sharath1512
Copy link

For a static joystick, when we drag the joystick outside the position where it exists, the joystick is not released and we have to do an extra click to release it.

Steps:

  1. drag the joystick outside the position where it is created (like into the white space.)
  2. Observe that it is not released.
@yoannmoinet
Copy link
Owner

Do you have a setup I can test.

I can't reproduce it in the demo.

http://yoannmoinet.github.io/nipplejs/#demo

@sharathava
Copy link

Hi,

This can be reproduced in demo. This happens on IE and chrome but not on firefox. This is for the static mode (static tab).

@yoannmoinet
Copy link
Owner

what would be the expected behavior?

@sharathava
Copy link

I would expect the behaviour should be as it is behaving in the firefox. The joystick should be released.

@yoannmoinet
Copy link
Owner

that would be cool indeed, the issue is Chrome (and probably IE too) won't let you track the mouse move outside the window.
So it can't be the same as Firefox.
I could make it like it would release the joystick as soon as the cursor goes out of the window.

@sharathava
Copy link

Okay, So firefox would track the mouse move outside the window.
Is there a way I can fix this for IE and chrome? Or is it a limitation?

@adriancabouli
Copy link

touchcancel event it fix the problem!,

$(document).on('touchcancel', function(event) {
REMOVE_AND_CREATE_JOYSTIC() // or whatever...
});

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

No branches or pull requests

4 participants