Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#11454 closed enhancement (fixed)

Enable drag-move on touch screen devices

Reported by: xMartin Owned by: bill
Priority: high Milestone: 1.6
Component: DnD Version: 1.5
Keywords: iphone ipad android touch Cc: Eugene Lazutkin
Blocked By: Blocking:

Description (last modified by bill)

Drag-move and thus dijit sliders should be working on touch screen devices.

I hacked trunk to find out how to do it for WebKit on the iPad. It's just about using some touch events instead of mouse events. The attached patch works but is just to give a starting point.

Attachments (3)

touchSlider-dojo.patch (3.2 KB) - added by xMartin 9 years ago.
touchSlider-dijit.patch (974 bytes) - added by xMartin 9 years ago.
dojox-RangeSlider-touch.diff (1.6 KB) - added by jcline 8 years ago.
patch for RangeSlider?.js to enable touch events.

Download all attachments as: .zip

Change History (12)

Changed 9 years ago by xMartin

Attachment: touchSlider-dojo.patch added

Changed 9 years ago by xMartin

Attachment: touchSlider-dijit.patch added

comment:1 Changed 9 years ago by bill

Component: GeneralDnD
Owner: changed from anonymous to Eugene Lazutkin

Hi stadler, thanks for the contribution. Can you file a CLA? Looks like you don't have one.

comment:2 Changed 9 years ago by xMartin

Hi, I work for excentos GmbH and we have a CCLA. Is there anything I need to do?

comment:3 Changed 9 years ago by Eugene Lazutkin

Milestone: tbd1.6

The patch contains platform sniffing. That part should probably moved to the Base. Other than that the patch looks alright to me, but I cannot test it because I don't have any iDevice.

Could any committer with an access to iPhone/iPod/iPad refactor, test, and commit for me?

comment:4 Changed 9 years ago by bill

Owner: changed from Eugene Lazutkin to bill
Status: newassigned

I can take this, I've got an iPhone. I'll move the isiPhone sniffing alongside the other sniffing like for isIE6 etc.

comment:5 Changed 9 years ago by bill

Turns out the sniffing can be replaced by feature detection, which will hopefully work for other devices beside iPhone/iPod/iPad. Also, the either/or approach (touch vs. mouse) is probably a bad idea because of blackberry, which IIUC supports both touch and mouse on the same device. Also, the patch only addresses drag-move, not real drag and drop.

So I'm refactoring to address those issues.

comment:6 in reply to:  5 Changed 9 years ago by Eugene Lazutkin

Cc: Eugene Lazutkin added

Replying to bill:

So I'm refactoring to address those issues.

Sounds good. It would be really nice, if we can use the same code for other mobile platforms, like Android and Blackberry.

comment:7 Changed 9 years ago by bill

Description: modified (diff)
Summary: Enable drag n drop on touch screen devicesEnable drag-move on touch screen devices

I've realized that supporting DnD is hard because there's no touch equivalent of onmouseover/onmouseout. Like Neil wrote in http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/, DnD for mobile would need to work by registering all the drop target positions. Perhaps dojox.mdnd is a better fit for that.

Anyway, this ticket was clearly meant for supporting drag-move, so I'll check in a modified version of stadler's code to do that.

comment:8 Changed 9 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [23533]) Support drag-move for touch devices. Makes dojo/tests/dnd/test_moveable.html and dijit/tests/form/test_Slider.html work on iPhone, and hopefully other devices too.

Original patch from stadler (excentos GmbH, CCLA), thanks! I modified it to remove the browser sniffing.

Fixes #11454 !strict.

Changed 8 years ago by jcline

patch for RangeSlider?.js to enable touch events.

comment:9 Changed 8 years ago by Dmachi

(In [23672]) apply jcline's rangeslider patch. fixes #11454

Note: See TracTickets for help on using tickets.