From 912662bbbb063f6421896217538215f30fcb7df1 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Fri, 6 Nov 2015 13:48:11 +1100 Subject: [PATCH] toggle ui-draggable-handle class with draggable On touch devices, it's not possible to scroll a page by dragging on an item even when draggable is disabled due to the **ui-draggable-handle** class which is added to the **grid-stack-item-content** JQuery-UI Draggable doesn't remove this class when it's disabled, so it prevents touch scrolling the page on the item ```
.ui-draggable-handle { -ms-touch-action: none; touch-action: none; } ``` --- src/gridstack.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gridstack.js b/src/gridstack.js index afd7843..09cee2b 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -801,9 +801,11 @@ node.no_move = !(val || false); if (node.no_move) { el.draggable('disable'); + el.removeClass('ui-draggable-handle'); } else { el.draggable('enable'); + el.addClass('ui-draggable-handle'); } }); return this;