Closed
Bug 1001576
Opened 11 years ago
Closed 11 years ago
Page occasionally pans after calling preventDefault in a touchmove handler
Categories
(Firefox OS Graveyard :: Gaia::Homescreen, defect)
Tracking
(b2g-v2.0 fixed)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| b2g-v2.0 | --- | fixed |
People
(Reporter: kgrandon, Assigned: kgrandon)
References
Details
For the vertical homescreen we have a use case where we need to drag and drop icons on the page inside of a scrollable region. We do this by registering touch start/touchmove/touchend handlers. Inside of the touchmove handler we call event.preventDefault() and move the icon to the specified position. Most of the time this works correctly, but about 25% of the time the page will also move as if in a pan action.
I am working on getting a reduced test case for this issue.
Comment 1•11 years ago
|
||
1) The preventDefault needs to be called on the first touchmove event for it to have any effect
2) There is a time limit (300ms) to how long APZ will wait to get a response from content before starting the pan. The time it takes for the touch event to be delivered to content, run the handler, and send the response back to the main process is all included here. It might that you're running into this limit - bump up the apz.content_response_timeout pref to something larger to see if that's it. Default value is 300, units are milliseconds.
| Assignee | ||
Comment 2•11 years ago
|
||
Thanks for the quick reply. It sounds like we should be able to solve this in content, so I will verify that there really is a bug or that it's impossible to solve in content before we have a platform bug. Moving into homescreen.
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Component: Panning and Zooming → Gaia::Homescreen
Product: Core → Firefox OS
| Assignee | ||
Comment 3•11 years ago
|
||
One way that we can solve this is by using the contextmenu event that the current homescreen uses. Though this does have the unfortunate long delay, so UX may request that we shorten the context menu delay.
| Assignee | ||
Comment 4•11 years ago
|
||
Let's go with contextmenu for now and we can investigate shortening the delay in the future: https://github.com/mozilla-b2g/gaia/commit/785691785322ff7d7f7f127e9e38496231df37e8
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 5•11 years ago
|
||
Mass modify - set status-b2g-v2.0 fixed for fixed bugs under vertical homescreen dependency tree.
status-b2g-v2.0:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•