forked from furf/jquery-ui-touch-punch
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Hello !
Its a very good extension for UI !
Report a bug :
PC : Acer Aspire Z3-610
Windows 10
Bug on Chrome (Version 78.0.3904.108) and Firefox (71.0 (64 bits))
With Internet Explorer -> no problem
Jquery : jquery-1.11.0
Jquery UI : jquery-ui-1.12.1
Jquery-ui-touch-punch : jquery-ui-touch-punch-master-1.0.5
Function UI : draggable (with tactile)
If I drag element with touchscreen, we have a JS error :
TypeError: this._startPos is undefined jquery.ui.touch-punch.js:179:12
I have tested a modification with success (but i don't know if is the best solution) :
Replace :
if ((Math.abs(endPos.x - this._startPos.x) < 10) && (Math.abs(endPos.y - this._startPos.y) < 10)) {
// If the touch interaction did not move, it should trigger a click
if (!this._touchMoved || event.originalEvent.changedTouches[0].touchType === 'stylus') {
// Simulate the click event
simulateMouseEvent(event, 'click');
}
}
by :
if (typeof this._startPos !== "undefined") {
if ((Math.abs(endPos.x - this._startPos.x) < 10) && (Math.abs(endPos.y - this._startPos.y) < 10)) {
// If the touch interaction did not move, it should trigger a click
if (!this._touchMoved || event.originalEvent.changedTouches[0].touchType === 'stylus') {
// Simulate the click event
simulateMouseEvent(event, 'click');
}
}
}
Thank you !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels