Closed Bug 773427 Opened 8 years ago Closed 8 years ago

Some mobile Wikipedia reference links do not trigger sliding div


(Firefox for Android :: General, defect)

16 Branch
Not set



Firefox 17
Tracking Status
firefox14 --- unaffected
firefox15 --- unaffected
firefox16 --- verified
firefox17 --- verified
firefox18 --- verified


(Reporter: mcomella, Assigned: kats)



(Keywords: regression)


(2 files)

Attached image Sliding div on Aurora
1) Open Firefox Nightly for Android.
2) Click on the URL bar and navigate to Make sure you are not redirected to the full desktop site.
3) Scroll down until the first reference (displayed as "[1]", colored in blue as a clickable link) and tap it.

Expected: The sliding reference div slides into place.
Actual: Nothing (my device gives haptic feedback but no action takes place).

This works on most Wikipedia mobile pages.

Note that sometimes the reference links work and sometimes they do not – generally the first one on the page does not work. It's not always just one link either (and sometimes it seems fairly arbitrary which links work and which do not).

After playing around on the page for long enough, all the reference links seem to start working properly. After this point, going to another page will usually make it easier to reproduce.

This problem only seems to affect Nightly.

The bug may be related to the fact that the hitboxes are mobile Wikipedia are difficult to hit (ex: the hit box to expand an article is centered to the left of the down arrow, rather than the center of the down arrow). If this is the problem so that you find you can successfully hit the hit boxes each time, note it is significantly easier to do this on Aurora than on Nightly so it might be worth looking into anyway.

Tested on a Galaxy Nexus, Android 4.0.4. I have not tested on a larger device (where if the hit boxes are the issue, it may be easier to hit the references links since they will be larger).
Added see also to Bug 773431 because they are both bugs related to Wikipedia mobile references.
See Also: → 773431
I can confirm this -- also on a Galaxy Nexus, Android 4.0.4; works in current release Firefox but only triggers haptic feedback on nightly.

Note that the "+" at the end of the URL doesn't auto-link in Bugzilla above, you have to add it manually.
I did a quick smoke test with latest Release, Beta, Aurora, and Nightly. I only see this issue on Nightly. Tested with Samsung Galaxy S2, Android 4.0.3.
Added another Wikipedia mobile reference div bug to "see also".
See Also: → 773436
Assignee: nobody → bugmail.mozilla
This one definitely appears to be our bug. Clicking picks up the <a> (or more often, the <span>) as the clickable element, but when we call _sendMouseEvent in browser.js, isTouchClick gets set to true and we shift the coordinates onto the <p> element instead. So then we end up dispatching the mouse events on the <p> which does nothing. There's a very narrow window in which this doesn't happen on this particular link.
This is very similar to the problem in - there is a mismatch between the highlighted element (which is also responsible for whether or not you get haptic feedback) and the element on which the mouse events get dispatched.
Note that as of bug 770659 landing, we will no longer provide the (erroneous) haptic feedback, but clicking on the link is still not working well.
This appears to be because of rounding. For example, I clicked on the [1] link at coordinates (235, 322). The span element was actually at (231.14999389648438, 316.29998779296875) with w=2.70001220703125, h=11.5. So the click coordinate got moved to the edge of the span, at (233.85000610351562, 322). This then gets rounded to (234, 322) which is outside the span, and is actually the paragraph element.
Attached patch PatchSplinter Review
The main fix is the floor/ceil calls to make sure that the shifted point falls within the desired element.
Attachment #645315 - Flags: review?(wjohnston)
(This bug is a regression from bug 742540)
Keywords: regression
Attachment #645315 - Flags: review?(wjohnston) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Comment on attachment 645315 [details] [diff] [review]

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 742540
User impact if declined: sometimes clicking on things (small elements with edges that are not pixel-aligned) doesn't work
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): mobile only, low risk
String or UUID changes made by this patch: none
Attachment #645315 - Flags: approval-mozilla-aurora?
Comment on attachment 645315 [details] [diff] [review]

[Triage Comment]
Prevents a regression in FN16. Approved for Aurora.
Attachment #645315 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.