mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +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'));
|
dragImage || (dragImage = elementById('messagesDragImage'));
|
||||||
if (data && dragImage && !ThemeStore.isMobile()) {
|
if (data && dragImage && !ThemeStore.isMobile()) {
|
||||||
dragImage.querySelector('.text').textContent = data.uids.length;
|
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-copy', e.ctrlKey);
|
||||||
img.classList.toggle('icon-mail', !e.ctrlKey);
|
img.classList.toggle('icon-mail', !e.ctrlKey);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
/*
|
|
||||||
.g-ui-user-select-none {
|
.g-ui-user-select-none {
|
||||||
webkit-touch-callout: none;
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
standard-user-select: none;
|
-webkit-touch-callout: none;
|
||||||
touch-callout: none;
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
.g-ui-link {
|
.g-ui-link {
|
||||||
color: #369;
|
color: #369;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
if (dragSource) {
|
if (dragSource) {
|
||||||
// get ready to start dragging
|
// get ready to start dragging
|
||||||
lastTouch = e;
|
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
|
// 1000 ms to wait, chrome on android triggers dragstart in 600
|
||||||
holdInterval = setTimeout(() => {
|
holdInterval = setTimeout(() => {
|
||||||
|
|
@ -130,10 +130,6 @@
|
||||||
|
|
||||||
touchend = e => {
|
touchend = e => {
|
||||||
if (dragSource) {
|
if (dragSource) {
|
||||||
if (!isDragging) {
|
|
||||||
// touched the element but didn't drag, so simulate a click
|
|
||||||
dispatchEvent(lastTouch, 'click', e.target);
|
|
||||||
}
|
|
||||||
// finish dragging
|
// finish dragging
|
||||||
allowDrop && 'touchcancel' !== e.type && dispatchEvent(lastTouch, 'drop', lastTarget);
|
allowDrop && 'touchcancel' !== e.type && dispatchEvent(lastTouch, 'drop', lastTarget);
|
||||||
reset();
|
reset();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue