PDA

View Full Version : Ext.util.draggable not starting on touchstart event



rando
3 Aug 2011, 1:04 AM
I'm using Ext.util.draggable to drag a component and I've noticed that on the iPad I need to touch the element for a second or so before the drag action can start. This delay makes the UI interaction quite painful. Looking at the draggable source code in sencha-touch-debug.js, it appears that while the setEnabled() does add a listener for the 'touchstart' event, the associated function is empty.

What is the reason for this? Was that intentional or is it a bug?



...
setEnabled: function(enabled) {
this.eventTarget[enabled ? 'on' : 'un'](this.startEventName, this.onStart, this, this.dragOptions);
this.eventTarget[enabled ? 'on' : 'un']('drag', this.onDrag, this, this.dragOptions);
this.eventTarget[enabled ? 'on' : 'un']('dragend', this.onDragEnd, this, this.dragOptions);
this.eventTarget[enabled ? 'on' : 'un']('touchstart', this.onTouchStart, this);
...
// @private
onTouchStart: function() {

},