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
This commit is contained in:
Marc Hartmayer 2020-04-23 02:09:01 +02:00
parent 981ed546f1
commit 6476503137
5 changed files with 12 additions and 15 deletions

View file

@ -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() {