Swiping unexpectedly prevents text selection

Author: saschanazCreated Jul 22, 2021Updated Jul 22, 2021

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() 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.

Source: jquery-archive/jquery-mobile