Skip to content

touch sometime doesn't work on ipad #304

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

Closed
loverdrive opened this issue Oct 27, 2015 · 24 comments
Closed

touch sometime doesn't work on ipad #304

loverdrive opened this issue Oct 27, 2015 · 24 comments

Comments

@loverdrive
Copy link

loverdrive commented Oct 27, 2015

Hi, I'm using interact.js into a webapp, and compile it with cordova, to run it on ipad.
On ipad, sometimes the draggable elements doesn't drag, doesn't move..while on desktop it seems to work all the time! I tryed to link ipad on mac to see console log, and also when draggable don't move, it gives no error in console log.

Have you any idea which could be the cause?

Thank you very much, and for this great library! :)

@taye
Copy link
Owner

taye commented Oct 27, 2015

Can you try the build from the unstable branch? https://rawgit.com/taye/interact.js/unstable/dist/interact.js.

@loverdrive
Copy link
Author

Hi, i tested unstable branch, and the problem is the same.
Usually occours when i move more times the draggable element.. So, to "reset" it, i need to close the app and reopen it. Change page and return to the page with drag&drop, without close the app, don't solve the problem

I added more info from console.log (now the problem occurs also in the browser, not only on tablet. Occurs also when i drag and leave element more times):

Uncaught TypeError: Cannot read property 'options' of undefined
  inertiaFrame                                       @interact-unstable.js:1470
  Interaction.boundInertiaFrame           @interact-unstable.js:986
  (anonymous function)                         @interact-unstable.js:6184

Uncaught TypeError: Cannot read property 'options' of undefined
  finder.inertiaResume      @   interact-unstable.js:5724
  finder.search     @   interact-unstable.js:5690
  (anonymous function)      @   interact-unstable.js:1673

EDIT: Above problem seems to not occur in 1.2.6 version

taye added a commit that referenced this issue Nov 1, 2015
taye added a commit that referenced this issue Nov 1, 2015
@taye
Copy link
Owner

taye commented Nov 1, 2015

The new errors should now be fixed.

@taye
Copy link
Owner

taye commented Nov 5, 2015

@loverdrive can you confirm if this is issue if fixed?

@loverdrive
Copy link
Author

i'll test in these days

@loverdrive
Copy link
Author

@taye, i tryed it and now in browser-desktop it works.
In these days i'll try to test also on tablet

@loverdrive
Copy link
Author

Hi @taye, i've test dev version on ipad, and doesn't work...

@taye
Copy link
Owner

taye commented Nov 20, 2015

Can you check if you can reproduce the bug on a regular web page in Chrome or Safari?

@loverdrive
Copy link
Author

i tryed some minutes on Safari from ipad, and it seems work correctly.

@loverdrive
Copy link
Author

@taye Update: sometimes the problem occurs also in Safari (on ipad).

@datom
Copy link

datom commented Nov 26, 2015

Hi,
i have also the same problem. I tried something out and i think i know where it comes from.
This only appears if the system think i want to do scrolling instead of dragging an element. Every time the dragging was not working, i was able to scroll the page.

@loverdrive can you confirm my behavior?

@loverdrive
Copy link
Author

@datom the problem occurs also when i try to drag horizzontally, where there is no scroll.

@abelricaurte
Copy link

Same problem here:
Links inside a 'rezisable' element, are not 'clickable' on touchscreen.
Tested in Chrome on Ipad.

*hint: if touched sligthly below (say 1 or 2 pixels), it does work.
any clue?

@cheungkonghou
Copy link

Occasionally on Chrome, the tap event doesn't work at all. However if open the developer console and emulate as mobile touch screen, it works. The problem doesn't go away even reloaded the page.
Windows 7 Chrome 47

@cheungkonghou
Copy link

Moreover, the tap event is fired twice on version 1.2.6. However there's no such problem on version 1.2.4.

@taye
Copy link
Owner

taye commented Dec 13, 2015

@loverdrive, @datom Could you make a small demo for this issue?

@abelricaurte you're describing a different issue. See #58.

@cheungkonghou This issue is about problems on iPad. If you can reproduce the problem that you're having on the latest unstable branch (https://rawgit.com/taye/interact.js/unstable/dist/interact.js), please open a new issue about it.

@cheungkonghou
Copy link

I cannot reproduce the issue every time but it seems it's related to the detection of touch in Chrome (https://code.google.com/p/chromium/issues/detail?id=467934) and it happens on desktop only.

@taye
Copy link
Owner

taye commented Dec 23, 2015

@cheungkonghou try using the latest unstable build. If you're still having problems then open a new Github issue for that problem.

@kardanov
Copy link

kardanov commented Jan 8, 2016

@cheungkonghou this info could be helpful:
http://stackoverflow.com/questions/33033089/interact-js-1-2-4-drag-and-gesture-action-confusion#
at least it solved same problem for me.

@taye
Copy link
Owner

taye commented Jan 19, 2016

@loverdrive Please try the unstable build again. I've made a change which might have solved this problem. If the problem persists, please make a demo that I can try when I get a chance with an iOS device.

@vnzlogin
Copy link

try
interact(".className").on('down', function (event) {
...
})

@gabriel-dehan
Copy link

Hello ! I am having the issue (currently testing in the Simulator on mac OS X, simulating an iPad 2). My drag events are not working in Safari. The only way to have them work so far has been "double tapping then drag". If I do just that it seems to work but it's pretty counter-intuitive. I have tried to use the unstable branch but there is an error about iterator3 or something. Also the SO answer did not work with the "down" handler did not work for me.

Any news on this ?

@nurevaSaeed
Copy link

Hi,

I'm having a similar issue. I'm using version 1.2.6. It happens on iPad-Safari more often. I register my "draggable" container for "onstart" but sometimes (and randomly) it stops firing the event. Unfortunately I can't find a bunch of steps to reproduce it consistently.
For some other operation in the code I have touch event listener on $window that enables/disables the "onstart" listener:

interact('.myContainer').draggable({enabled: false});
...
interact('.myContainer').draggable({enabled: true});

it doesn't force interact to fire "onstart" event either.

I appreciate any suggestions.

Cheers.

@taye taye closed this as completed in 9417152 Mar 8, 2017
@taye
Copy link
Owner

taye commented Mar 8, 2017

This issue should now be reseolved by 9417152. You'll have to use the unstable branch (which is much less buggy than the current stable branch) to benefit from this fix. Thanks to everyone who provided info and sorry for taking so long to finally fix this.

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

9 participants