-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
We've run into an issue where we need to prevent default on a touch, as the iphone will then trigger a mouse event too, thereby duplicating everything.
I've modified the library to include a configuration option called preventTouchDefault and preventMouseDefault.
And added the folllwing lines of code to replace
Original code:
if (options.preventDefault) {
event.preventDefault && event.preventDefault();
return false;
}
New code
isMouse=false;
if(event.type.match(/^mouse/))
isMouse=true;
// prevent default handlers
if ((options.preventTouchDefault && !isMouse) || (options.preventMouseDefault && isMouse)) {
event.preventDefault && event.preventDefault();
return false;
}
Csuszpajsz74
Metadata
Metadata
Assignees
Labels
No labels