Closed Bug 1247095 Opened 8 years ago Closed 8 years ago

Disable re-targeting mouse event in Fennec

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox45 fixed, firefox46 fixed, firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox45 --- fixed
firefox46 --- fixed
firefox47 --- fixed

People

(Reporter: rbarker, Assigned: rbarker)

References

Details

Attachments

(2 files)

Re-targeting mouse events appears to cause these issues:

1) When an <a> or input element is above or below an element with a jQuery event handler, the function FindFrameTargetedByInputEvent is unable to detect that the jQuery enabled element is clickable due to the fact that the event handler is not actually stored on the element. This cause the <a> element to be targeted when it should not.

2) Selecting text above or below an <a> element is not possible because FindFrameTargetedByInputEvent will always re-target the element so the link pop-up menu is always displayed instead of selecting the text being longpressed.

Disabling re-targeting of mouse events in Fennec appears to be the best option at this time to alleviate these issues.
Assignee: nobody → rbarker
For (1), how does jQuery trigger the event handler?
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> For (1), how does jQuery trigger the event handler?

It catchs the event at the top of the document, then uses the target in the event to look for an attribute called jquery12-really-big-number-38, the value of this attribute is the location of the elements jQuery cache entry. The various event handlers for the element are stored in the cache and are invoked from there.
Attachment #8717647 - Flags: review?(snorp) → review+
https://hg.mozilla.org/mozilla-central/rev/3cb44e7f6639
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Comment on attachment 8717647 [details] [diff] [review]
0001-Bug-1247095-Disable-re-targeting-mouse-event-in-Fennec-16020914-aff215c.patch

Approval Request Comment
[Feature/regressing bug #]:Bug 1233272, Bug 1235339
[User impact if declined]:Clicking on links and selecting text is much more difficult in certain situations. Particularly egregious on pages that use jQuery for for event handling.
[Describe test coverage new/current, TreeHerder]:There do not seem to be any tests that are specific to touch re-targeting. All tests pass with or without this feature disabled.
[Risks and why]: links with a very small touch area may become harder to press without zooming in.
[String/UUID change made/needed]:None
Attachment #8717647 - Flags: approval-mozilla-beta?
Attachment #8717647 - Flags: approval-mozilla-aurora?
Comment on attachment 8717647 [details] [diff] [review]
0001-Bug-1247095-Disable-re-targeting-mouse-event-in-Fennec-16020914-aff215c.patch

OK, taking it as it seems to impact major websites
Should be in 45 beta 7
Attachment #8717647 - Flags: approval-mozilla-beta?
Attachment #8717647 - Flags: approval-mozilla-beta+
Attachment #8717647 - Flags: approval-mozilla-aurora?
Attachment #8717647 - Flags: approval-mozilla-aurora+
Depends on: 1437372

(In reply to Randall Barker [:rbarker] from comment #0)

  1. When an <a> or input element is above or below an element with a jQuery
    event handler, the function FindFrameTargetedByInputEvent is unable to
    detect that the jQuery enabled element is clickable due to the fact that the
    event handler is not actually stored on the element. This cause the <a>
    element to be targeted when it should not.

There are no bugs linked to this one (or that I could find) that demonstrate this problem. I tried creating a test case manually but registering a click handler always added it as a listener on the individual element rather than on the root of the document. I tried with jQuery versions 3.4.1, 2.2.4, and 1.12.4 (the latest 3.x, 2.x, and 1.x versions available right now).

Here's my simple test page that doesn't repro the problem.

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: