summaryrefslogtreecommitdiffstats
path: root/client/components/lists/list.js
diff options
context:
space:
mode:
authorMarc Hartmayer <hello@hartmayer.com>2020-04-23 02:09:01 +0200
committerMarc Hartmayer <hello@hartmayer.com>2020-04-23 03:02:03 +0200
commit6476503137fc41cf52e913aa33aed6bb1abaac6a (patch)
tree2e578e709706934e908af36c3cb1bdb4f68b9848 /client/components/lists/list.js
parent981ed546f1cae45ad8b92b393ee29c1a26277f32 (diff)
downloadwekan-6476503137fc41cf52e913aa33aed6bb1abaac6a.tar.gz
wekan-6476503137fc41cf52e913aa33aed6bb1abaac6a.tar.bz2
wekan-6476503137fc41cf52e913aa33aed6bb1abaac6a.zip
Fix drag-and-drop and scrolling on mobile devices
Use drag handles on "miniscreens" whenever useful, this is especially useful on mobile device. This should hopefully fix https://github.com/wekan/wekan/issues/2947. While at it, simplify the condition Utils.isMiniScreen() || (!Utils.isMiniScreen() && showDesktopDragHandles) to Utils.isMiniScreen() || showDesktopDragHandle
Diffstat (limited to 'client/components/lists/list.js')
-rw-r--r--client/components/lists/list.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index 7ce520dc..a0031b2f 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -129,7 +129,7 @@ BlazeComponent.extendComponent({
showDesktopDragHandles = false;
}
- if (!Utils.isMiniScreen() && showDesktopDragHandles) {
+ if (Utils.isMiniScreen() || showDesktopDragHandles) {
$cards.sortable({
handle: '.handle',
});
@@ -143,8 +143,8 @@ BlazeComponent.extendComponent({
$cards.sortable(
'option',
'disabled',
- // Disable drag-dropping when user is not member/is miniscreen
- !userIsMember() || Utils.isMiniScreen(),
+ // Disable drag-dropping when user is not member
+ !userIsMember(),
// Not disable drag-dropping while in multi-selection mode
// MultiSelection.isActive() || !userIsMember(),
);