Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105903

DragHandler does not active on press when dragThreshold is zero

    XMLWordPrintable

Details

    • All

    Description

      DragHandler won't recognize a press as a start of a drag gesture even when dragThreshold property is explicitly set to zero.

      This breaks the case where an item is programmed/animated to fly around, and user catches it using touch/mouse pointer and possibly starts dragging afterward.

      Steps to reproduce:

      Suppose there's an item which can be dragged. When drag handler becomes active, this item's position gets bound to the drag handler's centroid/offset/whatever.

      1. Item flies under the cursor (for example, animated back to the original position from a previous incomplete drag).
      2. User pressed left mouse button.
      3. User moves mouse.

      Expected behavior:

      At step 2 the item freezes in place. At step 3 it follows mouse cursor.

      Actual behavior:

      At step 2 the item keeps moving to its whatever original position was. At step 3 as soon as the drag is detected (which in case of 0 threshold is as soon as mouse moves at least 1 pixel), the item suddenly jumps back to where it was pressed (because drag handler remembered its "press" location) and then starts following the mouse as usual.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              ratijas ivan tkachenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes