Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.7.0
Description
Currently, an enabled drag handler will start drag if
- it is enabled
- the delta of input coordinates exceeded the dragTreshold
This can lead to unintended drag operations if the DragHandler is enabled while an input device is already in "pressed/down" state. In this case, the DragHandler never received a "press" in enabled state, still it starts the drag operation. In many use cases, this is surprising to the user.
There are workarounds (e.g. use a MouseArea to enable/disable the drag handler on press/release, or a corresponding component for the type of input device you need), but they add some complexity for what I would consider the "more common" use case (something you could argue about, I know).
Since behavior has to remain compatible, the default behavior cannot easily be changed, anyway. Therefore I would suggest a property e.g. "startDragOnPressOnly" or similar.
I have attached a little test project. The drag handler is enabled 2s after application start. If you press-and-hold the input device before that, and wait for the 2s to expire, you can start dragging without pressing anything.