Skip to content

Commit

Permalink
[BUGFIX] Disable pagetree drag and drop for touch inputs
Browse files Browse the repository at this point in the history
While trying to restore the full desktop functionality
aka mouse and keyboard behavior on a touch-device we
came to the conclusion that it feels unintuitive.

On touch devices, you have by design fewer input options
and differentiators than with dedicated input devices like
a mouse. It feels best to disable the drag and drop
behavior and enable a smooth scrolling and navigation
experience.

Resolves: #91755
Resolves: #86946
Resolves: #93960
Releases: main, 11.5, 10.4
Change-Id: Ic08d06283cbb2331ff49983bd7d18b446f8bd76a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75430
Tested-by: core-ci <typo3@b13.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
  • Loading branch information
benjaminkott authored and andreaskienast committed Aug 12, 2022
1 parent 49d5999 commit d00971f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -83,6 +83,7 @@ export class DragDrop {
public connectDragHandler(dragHandler: DragDropHandler) {
return d3drag
.drag()
.filter((event) => { return event instanceof MouseEvent; })
.clickDistance(5)
.on('start', function(evt: d3drag.D3DragEvent<any, any, any>) { dragHandler.dragStart(evt) && DragDrop.setDragStart(); })
.on('drag', function(evt: d3drag.D3DragEvent<any, any, any>) { dragHandler.dragDragged(evt); })
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d00971f

Please sign in to comment.