-
Notifications
You must be signed in to change notification settings - Fork 29
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
Touch: You stop getting move events when the element you started the drag on is removed from the dom. #27
Comments
I am not sure if it is related but I am seeing a similar issue in firefox, with or without touch.. |
Is that on a Windows machine? Does it support touch input? |
Tried it on two machines, both windows 7 one of which has a 22" capacitive touch screen and a mouse, the other mouse only. In firefox seeing it whether I use the touchscreen on the mouse. |
Thanks, I don't really have any hybrid machines to test with. Our focus is like this:
Right now we only use knockout-dragdrop for the first case, so I don't have a lot of resources to debug the later two. But as long as the existing functionality doesn't break, I'm open to pull requests. |
I will see if I can have another look tomorrow.. Not sure what it is about our setup but in firefox it is broken both in case 1 and case 3 from the point of the commit mentioned above.. The demo still works on those machines but we must have something else causing an issue.. It did work fine with an earlier version of the library though. |
Ok I have done some more testing today and come up with some interesting results.. knockout-dragdrop/lib/knockout.dragdrop.js Line 468 in f641258
Adding it back in at https://github.com/One-com/knockout-dragdrop/blob/master/lib/knockout.dragdrop.js#L511 solved them. I am not entirely sure what other consequences this will have but it solved the issues I had with firefox creating the overlay object and then freezing / selecting things until you released the click/touch The other interesting thing I have found, chrome obeys the touch timeout and produces the overlay object at the timeout no movement required and you are good to drag. Firefox does not obey the touch timeout however and never produces the overlay. However firefox will obey the distance requirement when using touch.. So if you drag the item at right angles to the scroll bar more than the minimum distance you get the overlay and you are ready to drag it where you like... However if you drag parallel to the scroll bar then you obviously scroll regardless of the timeout.. I hope that description makes sense.. I am not quite sure why chrome and firefox are behaving differently though.. Happy to submit a pull request for that missing line though to make firefox at least partially work. Cheers |
Thanks for digging into this, I still have a hard time reproducing the selection bug you are mentioning. The line was removed to make use the DOM focus still works, we really need that. But maybe we can prevent default and focus the element manually. It would be nice to be able to reproduce the bug before trying to fix it, so could you write down the entire setup you get the error on. Windows version, touch/no touch, browser version, ... |
No worries, I will collect all the specs tomorrow. |
Ok so both machines are windows 7 64 bit |
Thanks that helps. |
Sadly no :( |
I'm trying to reintroduce the preventDefault On Fri, Jun 19, 2015 at 8:57 AM, stretch4x4 [email protected]
|
Mhh that breaks touch scrolling :-S It would be really nice if you could produce an example where it fails, otherwise it is pretty hard for me to help. |
No worries I will have another look at our code Monday and attempt to build an example, thanks for taking a look. Sent from my Windows Phone From: Sune Simonsenmailto:[email protected] Mhh that breaks touch scrolling :-S It would be really nice if you could produce an example where it fails, otherwise it is pretty hard for me to help. Reply to this email directly or view it on GitHub: |
I haven't been able to break down our usage into an example yet but will try to find time to come back to this issue. |
#26 added initial touch support, but there are still some limitations. You stop getting move events when the element you started the drag on is removed from the dom.
The text was updated successfully, but these errors were encountered: