diff options
author | Marc Hartmayer <hello@hartmayer.com> | 2020-04-23 02:09:01 +0200 |
---|---|---|
committer | Marc Hartmayer <hello@hartmayer.com> | 2020-04-23 03:02:03 +0200 |
commit | 6476503137fc41cf52e913aa33aed6bb1abaac6a (patch) | |
tree | 2e578e709706934e908af36c3cb1bdb4f68b9848 /client/components/boards | |
parent | 981ed546f1cae45ad8b92b393ee29c1a26277f32 (diff) | |
download | wekan-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/boards')
-rw-r--r-- | client/components/boards/boardBody.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index e70a9f67..29922fcc 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -205,7 +205,7 @@ BlazeComponent.extendComponent({ } else { showDesktopDragHandles = false; } - if (!Utils.isMiniScreen() && showDesktopDragHandles) { + if (Utils.isMiniScreen() || showDesktopDragHandles) { $swimlanesDom.sortable({ handle: '.js-swimlane-header-handle', }); @@ -215,9 +215,8 @@ BlazeComponent.extendComponent({ }); } - // Disable drag-dropping if the current user is not a board member or is miniscreen + // Disable drag-dropping if the current user is not a board member $swimlanesDom.sortable('option', 'disabled', !userIsMember()); - $swimlanesDom.sortable('option', 'disabled', Utils.isMiniScreen()); }); function userIsMember() { |