But this line accidentally also calls preventDefault() when event is not a TouchEvent but a MouseEvent, and thus unexpectedly prevent desktop browsers from selecting texts, which is causing web compatibility issue.
The line should check the event type to prevent such issue.
jQuery Mobile calls
preventDefault()
on touch events to prevent scrolling.https://github.com/jquery/jquery-mobile/blob/4a6395df87acc4065ba39c3ab17d419fdc1a585b/js/events/touch.js#L248-L251
But this line accidentally also calls
preventDefault()
whenevent
is not aTouchEvent
but aMouseEvent
, and thus unexpectedly prevent desktop browsers from selecting texts, which is causing web compatibility issue.The line should check the event type to prevent such issue.