jQuery UI draggable problem on ipad
touch and hold image make seem at origin 0, 0 for a sec.
by kuyabiye
JavaScript
$.ui.draggable.prototype._mouseDrag = function(event, noPropagation) {
if (event.clientX === 0 && event.clientY === 0) {
return false;
}
// reset any necessary cached properties (see #5009)
if (this.offsetParentCssPosition === "fixed") {
this.offset.parent = this._getParentOffset();
}
// Compute the helpers position
this.position = this._generatePosition(event);
this.positionAbs = this._convertPositionTo("absolute");
// Call plugins and callbacks and use the resulting position
// if something is returned
if (!noPropagation) {
var ui = this._uiHash();
if (this._trigger("drag", event, ui) === false) {
this._mouseUp({});
return false;
}
this.position = ui.position;
}
if (!this.options.axis || this.options.axis !== "y") {
this.helper[0].style.left = this.position.left + "px";
}
if (!this.options.axis || this.options.axis !== "x") {
this.helper[0].style.top = this.position.top + "px";
}
if ($.ui.ddmanager) {
$.ui.ddmanager.drag(this, event);
}
// this.helper[0].style.top);
return false;
};