Skip to content

Commit cb4718b

Browse files
committed
Fix dragstop and resizestop not fired
In chrome touch mode, `dragstop` and `resizestop` were not fired immediately after releasing an element. This is because the global documentElement touchend event was never fired when you started the touch on an element. By adding a touchend event to the element, we make sure that the up method is called. This effectively emmits the `dragstop` and `resizestop` events immediately.
1 parent c0168ac commit cb4718b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/vue-drag-resize.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<div class="vdr" :style="style"
22
:class="active || isActive ? 'active' : 'inactive'"
33
@mousedown="bodyDown($event)"
4-
@touchstart="bodyDown($event)">
4+
@touchstart="bodyDown($event)"
5+
@touchend="up($event)">
56
<slot></slot>
67
<div
78
v-for="stick in sticks"

0 commit comments

Comments
 (0)