SwipeArea lets touch events through before a drag is detected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Oxide |
Fix Released
|
High
|
Olivier Tilloy | ||
ubuntu-ui-toolkit (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
webbrowser-app (Ubuntu) |
Fix Released
|
High
|
Olivier Tilloy |
Bug Description
I recently build a branch of lp:webbrowser-app with the latest code drop for DirectionalDragArea from lp:unity8. The branch is there: lp:~osomon/webbrowser-app/update-dda.
The DDA is used to detect a bottom edge drag over a WebView component, and display the tabs view accordingly. This works well, but often when a drag is detected the WebView under it gets a long press event, thus triggering the selection mechanism that it implements.
According to Daniel with whom I discussed the issue prior to filing this bug:
> Yes, the recognition parameters (and algorithm) were changed a bit.
> So it's perfectly possible that what you consider a long press (don't
> know how many milliseconds of pressed are needed for that) can happen
> before the DirectionalDragArea reaches a decision on whether the gesture
> is a directional drag gesture or not.
The threshold duration for a long press to be detected by the WebView is 500ms.
I’ve rebuilt my branch with DIRECTIONALDRAG
[DDA()] 10035 TouchBegin (id:8, state:pressed, scenePos:
[DDA()] WaitingForTouch -> Undecided
[DDA()] Unowned 10072 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] Sill within composition window. Let's wait more.
[DDA()] Unowned 10089 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] Sill within composition window. Let's wait more.
[DDA()] Unowned 10106 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] movedFarEnoughA
[DDA()] Didn't move far enough yet. Let's wait more.
[DDA()] Unowned 10123 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] movedFarEnoughA
[DDA()] Didn't move far enough yet. Let's wait more.
[DDA()] Unowned 10139 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] movedFarEnoughA
[DDA()] grabbing touch
[DDA()] Undecided -> Recognized
[DDA()] 10150 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10186 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10215 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10238 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10248 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10260 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10288 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10345 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10465 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10483 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10501 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10522 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10532 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10545 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10590 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10600 TouchUpdate (id:8, state:moved, scenePos:
[DDA()] 10601 TouchEnd (id:8, state:released, scenePos:
[DDA()] Recognized -> WaitingForTouch
Let me know if I can provide more useful information.
Related branches
- Chris Coulson: Approve
-
Diff: 222 lines (+56/-7)9 files modifiedqt/core/browser/oxide_qt_event_utils.cc (+18/-2)
qt/core/browser/oxide_qt_event_utils.h (+3/-1)
qt/core/browser/oxide_qt_web_view.cc (+5/-0)
qt/core/browser/oxide_qt_web_view.h (+1/-0)
qt/core/glue/oxide_qt_web_view_proxy.h (+1/-0)
qt/quick/api/oxideqquickwebview.cc (+12/-0)
qt/quick/api/oxideqquickwebview.h (+1/-0)
shared/browser/oxide_touch_event_state.cc (+13/-3)
shared/browser/oxide_touch_event_state.h (+2/-1)
Changed in unity8 (Ubuntu): | |
assignee: | nobody → Daniel d'Andrada (dandrader) |
Changed in webbrowser-app (Ubuntu): | |
assignee: | nobody → Olivier Tilloy (osomon) |
importance: | Undecided → High |
no longer affects: | webbrowser-app |
information type: | Public → Public Security |
information type: | Public Security → Public |
Changed in unity8 (Ubuntu): | |
assignee: | Daniel d'Andrada (dandrader) → nobody |
status: | Incomplete → New |
affects: | unity8 (Ubuntu) → ubuntu-ui-toolkit (Ubuntu) |
summary: |
- DirectionalDragArea lets a long press event through when a drag is - detected + SwipeArea lets touch events through when a drag is detected |
Changed in oxide: | |
status: | New → In Progress |
importance: | Undecided → High |
Changed in oxide: | |
status: | In Progress → Fix Released |
milestone: | none → branch-1.14 |
The log tells that 104 milliseconds have passed between the moment you landed your finger on the screen (10035) and the moment DirectionalDragArea recognized the gesture and grabbed the touch (10139). So much earlier than the 500 ms deadline for a longpress event to occur.
Could you please add a debug print (eg qDebug) at the moment your code notices a long press event? That way we would be able to see at what point in the log it happened.