mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +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
2
dev/External/User/ko.js
vendored
2
dev/External/User/ko.js
vendored
|
|
@ -92,7 +92,7 @@ ko.bindingHandlers.dragmessages = {
|
|||
dragImage || (dragImage = elementById('messagesDragImage'));
|
||||
if (data && dragImage && !ThemeStore.isMobile()) {
|
||||
dragImage.querySelector('.text').textContent = data.uids.length;
|
||||
let img = dragImage.querySelector('.icon-white');
|
||||
let img = dragImage.querySelector('i');
|
||||
img.classList.toggle('icon-copy', e.ctrlKey);
|
||||
img.classList.toggle('icon-mail', !e.ctrlKey);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
/*
|
||||
|
||||
.g-ui-user-select-none {
|
||||
webkit-touch-callout: none;
|
||||
user-select: none;
|
||||
standard-user-select: none;
|
||||
touch-callout: none;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
*/
|
||||
|
||||
.g-ui-link {
|
||||
color: #369;
|
||||
|
|
|
|||
|
|
@ -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