Closed Bug 986472 Opened 11 years ago Closed 11 years ago

Moving the click point to be on the highlight element doesn't work properly in some cases

Categories

(Firefox for Android Graveyard :: General, defect)

29 Branch
Other
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 31

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

The patch that landed for bug 973348 didn't really fix the underlying issue I was seeing, where clicking on links would often highlight the link but then not activate it. I did some local debugging and noticed that this happens when the element's client content rect left+width is an integer. When this happens, Math.floor(left+width) is the same as left+width, and this is actually outside the bounds of the element for when layout does a hit-test.
Attached patch Patch (deleted) — Splinter Review
This fixes the problem for me locally. Consider the case where the client rect is at (378.5, 37) with size (10.5x15). In this case Math.floor(378.5 + 10.5) = Math.floor(389) = 389. But the element extends from 378.5 upto but *not including* 389, so the calculated x-coordinate is just outside the element. This works fine if left+width is not an integer. The patch makes it work in all cases.
Attachment #8394766 - Flags: review?(wjohnston)
Comment on attachment 8394766 [details] [diff] [review] Patch Review of attachment 8394766 [details] [diff] [review]: ----------------------------------------------------------------- Ahh. I played with this in the other case, but because we wound up changing the target it didn't help. We've done it before though, so I'm glad to see we weren't crazy.
Attachment #8394766 - Flags: review?(wjohnston) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: