Skip to content

Commit 8e267af

Browse files
gnatlunnytechknowlogick
authored
Mobile fix for Project view: Add delay to Sortable.js on mobile, to ensure scrolling is possible. (#22152)
Mobile / touch devices currently get "hung up" on the sortable action, preventing any ability to visually scroll through the Project board to see issues. Solution: Sortable.js has a built-in fix using `delayOnTouchOnly` BEFORE https://user-images.githubusercontent.com/24665/208266817-6f2968b7-4788-4656-a941-f85b25fc59d5.mp4 AFTER https://user-images.githubusercontent.com/24665/208266822-3d327002-7a9d-41cf-9890-6d6b8dcb17be.mp4 Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent 86ace4b commit 8e267af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web_src/js/features/repo-projects.js

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ async function initRepoProjectSortable() {
4949
filter: '[data-id="0"]',
5050
animation: 150,
5151
ghostClass: 'card-ghost',
52+
delayOnTouchOnly: true,
53+
delay: 500,
5254
onSort: () => {
5355
boardColumns = mainBoard.getElementsByClassName('board-column');
5456
for (let i = 0; i < boardColumns.length; i++) {
@@ -76,6 +78,8 @@ async function initRepoProjectSortable() {
7678
ghostClass: 'card-ghost',
7779
onAdd: moveIssue,
7880
onUpdate: moveIssue,
81+
delayOnTouchOnly: true,
82+
delay: 500,
7983
});
8084
}
8185
}

0 commit comments

Comments
 (0)