diff options
author | Nathaniel Sabanski <sabanski.n@gmail.com> | 2022-12-20 20:56:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 23:56:58 -0500 |
commit | 8e267afd3569a56c7dde813d278c55b021b8431f (patch) | |
tree | d6b2607c15837861474f388a73250cb879241740 /web_src | |
parent | 86ace4b5c2cd6e02eae6814a81992c2591b6448d (diff) | |
download | gitea-8e267afd3569a56c7dde813d278c55b021b8431f.tar.gz gitea-8e267afd3569a56c7dde813d278c55b021b8431f.zip |
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 <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/features/repo-projects.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web_src/js/features/repo-projects.js b/web_src/js/features/repo-projects.js index 9777e6c8ec..78a9b14ad0 100644 --- a/web_src/js/features/repo-projects.js +++ b/web_src/js/features/repo-projects.js @@ -49,6 +49,8 @@ async function initRepoProjectSortable() { filter: '[data-id="0"]', animation: 150, ghostClass: 'card-ghost', + delayOnTouchOnly: true, + delay: 500, onSort: () => { boardColumns = mainBoard.getElementsByClassName('board-column'); for (let i = 0; i < boardColumns.length; i++) { @@ -76,6 +78,8 @@ async function initRepoProjectSortable() { ghostClass: 'card-ghost', onAdd: moveIssue, onUpdate: moveIssue, + delayOnTouchOnly: true, + delay: 500, }); } } |