Skip to content

Commit ec09c36

Browse files
committed
Draggable: Add touch-action attribute to draggable elements
1 parent 3227745 commit ec09c36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ui/jquery.ui.draggable.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ $.widget( "ui.draggable", $.ui.interaction, {
6868
this.element.css( "position", "relative" );
6969
}
7070

71+
// Add touch-action attribute for pointer events to prevent view panning when dragging
72+
this.element.attr("touch-action", "none");
73+
7174
this.element.addClass( "ui-draggable" );
7275
},
7376

0 commit comments

Comments
 (0)