Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

swipe gesture/event cancels mouse drag event in chrome #8582

Open
pstanton opened this issue Jul 10, 2017 · 1 comment
Open

swipe gesture/event cancels mouse drag event in chrome #8582

pstanton opened this issue Jul 10, 2017 · 1 comment

Comments

@pstanton
Copy link

pstanton commented Jul 10, 2017

as described on stackoverflow

I'm having trouble with the "swipe" event(s) implemented by JQuery Mobile. As a general rule, just listening to an event should not alter the user experience. By this rule, there would seem to be a bug in JQM & Chrome.

In firefox and IE, it works as expected, however in Chrome the mouse drag event seems to be terminated when the swipe event is triggered.

The following eg. is demonstrated in this jsfiddle

<input type="email" value="drag-select@this-text.com" />

<script>
$(document).ready(function() {
  $(document).on("swipe", function(evt) {
    console.log("swiped " + new Date().getTime());
  });

  console.log("ready");
});
</script>

if you drag your mouse over the text in the input in order to select it, only 2-5 characters can be selected.

@apsdehal
Copy link
Contributor

apsdehal commented Jul 13, 2017

I can confirm this issue on 1.5. Digging more, I found out that after removing the css from play the drag works as expected. I will look more into it when I get time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.