Skip to content

Commit 912662b

Browse files
committed
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 ``` <div class="grid-stack-item-content ui-draggable-handle"> .ui-draggable-handle { -ms-touch-action: none; touch-action: none; } ```
1 parent fc571d8 commit 912662b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gridstack.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,9 +801,11 @@
801801
node.no_move = !(val || false);
802802
if (node.no_move) {
803803
el.draggable('disable');
804+
el.removeClass('ui-draggable-handle');
804805
}
805806
else {
806807
el.draggable('enable');
808+
el.addClass('ui-draggable-handle');
807809
}
808810
});
809811
return this;

0 commit comments

Comments
 (0)