vue3-touch-events icon indicating copy to clipboard operation
vue3-touch-events copied to clipboard

confirm inside v-touch:hold-handler prevents at least the execution of one subsequent v-touch:hold-event in chrome

Open lsblsb opened this issue 3 years ago • 1 comments

System: Windows 10 / Chrome 92.0.4515.131

Problem: A windows.confirm() inside a v-touch:hold handler prevents at least the execution of one subsequent v-touch:hold-event in chrome. This even happens when i place the confirm() call inside a setTimeout() function.

It works perfectly with firefox.

Example (snippets):

<button v-touch:hold="onTouchHold">TEST</button>
methods: {
    onTouchHold() {
      console.log("touchhold")
        if (confirm("Confirm?")) { //works without...
          this.variable = 1
        }                          //...this if-confirm-block
    },
}

lsblsb avatar Aug 13 '21 12:08 lsblsb

Call the confirm() in an async function or callback set with setTimeout.

robinrodricks avatar Oct 03 '21 12:10 robinrodricks