Changes between Version 2 and Version 3 of Ticket #16739, comment 3


Ignore:
Timestamp:
Feb 22, 2013, 5:45:06 AM (9 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16739, comment 3

    v2 v3  
    55On iPad, you can drag your finger off the viewport to the URL bar, and then drag it back on to the viewport again, and scrolling continues correctly... so ideally just moving your finger off the viewport wouldn't trigger a touch.end event.   However, I guess the problem is if you drag your finger to the URL bar and then release it, in which case there's no notification.
    66
    7 Your patch is to emit touchmove/touchend events when finger moves off the viewport.   I can see how that will fix the problem with dojox/mobile, and also if you could do the same on desktop I can see how it would fix some problems there, like dojo/tests/dnd/test_moveable.html on IE8, moving the cursor off viewport while dragging a node and then doing mouseup, but the node is still in a drag state.
     7Your patch is to emit touchmove/touchend events when your finger moves off the viewport.   I can see how that will fix the problem with dojox/mobile, and also if you could do the same on desktop I can see how it would fix some problems there, like dojo/tests/dnd/test_moveable.html on IE8, moving the cursor off viewport while dragging a node and then doing mouseup, but the node is still in a drag state.
    88
    99However, the patch seems dangerous in general.  For example, imagine the viewport is split into four quadrants, and you can drag & drop items between those four containers.   Dropping an item off viewport probably shouldn't drop it in the last quadrant it was over, but rather the drag operation should be canceled.   So dropping off viewport sounds like a touch.cancel event, not a touch.end event.
    1010
    11 Also, desktop doesn't give a mouse up event unless the user actually releases the mouse.    Do you get an MSPointerUp event when dragging your finger off the viewport?
     11About other platforms besides webkit mobile: desktop doesn't give a mouse up event unless the user actually releases the mouse.    Do you get an MSPointerUp event when dragging your finger off the viewport?
    1212
    13 Your change to dojotouchmove handling seems strange also.  A node will only get a mousemove event when the new mouse coordinates are over the node.   Why should touch.move act differently?   I guess that matches native touchmove behavior, but it's inconsistent with desktop.
     13Your change to dojotouchmove handling seems strange also.  A node will only get a mousemove event when the new mouse coordinates are over the node.   Why should touch.move act differently?   I guess your changes matches native touchmove behavior, but it's inconsistent with desktop.
    1414
    1515Finally, I'm wondering if the dojox/mobile code mentioned in this ticket should even be using dojo/touch.   From what I've seen on iPad/iPhone, once you touch an inner <div> to start scrolling it, you can continue scrolling it by moving your finger off of the <div> to other positions on the screen.  So setting up a touch.move listener on an inner <div> doesn't match native iOS behavior.   If however the touch.move listener is on <body> then I guess that's OK.