mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
Bugfix: improved firefox mobile draggable solution
This commit is contained in:
parent
ae3bab4b35
commit
0696e20878
3 changed files with 4 additions and 11 deletions
|
|
@ -93,7 +93,7 @@
|
|||
if (dragSource) {
|
||||
// get ready to start dragging
|
||||
lastTouch = e;
|
||||
e.preventDefault(); // prevent scrolling NOTE: this creates a bug that click will not work
|
||||
// dragSource.style.userSelect = 'none';
|
||||
|
||||
// 1000 ms to wait, chrome on android triggers dragstart in 600
|
||||
holdInterval = setTimeout(() => {
|
||||
|
|
@ -130,10 +130,6 @@
|
|||
|
||||
touchend = e => {
|
||||
if (dragSource) {
|
||||
if (!isDragging) {
|
||||
// touched the element but didn't drag, so simulate a click
|
||||
dispatchEvent(lastTouch, 'click', e.target);
|
||||
}
|
||||
// finish dragging
|
||||
allowDrop && 'touchcancel' !== e.type && dispatchEvent(lastTouch, 'drop', lastTarget);
|
||||
reset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue