Closed Bug 1957321 Opened 7 months ago Closed 6 months ago

`FindFrameTargetedByInputEvent()` should always check clickable target even if looking for a touch target

Categories

(Core :: Panning and Zooming, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

In bug 1637908, FindFrameTargetedByInputEvent() designed for looking only for touch event listening elements for targeting the touch event targets. The reason is explained as:

The heuristics we want for touch events are different and should generally be very conservative, because we almost never want to retarget the raw touch events.

However, Pointer Events now defines that click event target should be the captured target by the source event and pointerdown will start implicit pointer capture with its target.

So, if there is a clickable element around the single tap point but FindFrameTargetedByInputEvent() considers the touchstart target as an element outside the clickable element, click event won't be fired on the clickable event target once we align the behavior to the standard in bug 1885232.

Therefore, I think that FindFrameTargetedByInputEvent() needs to look for clickable target too even if it looks for the touch target.

Pointer Events now defines that click event target should be the captured target
which is the target of the source event [1] and pointerdown will start
implicit pointer capture with its target when nobody explicitly sets pointer
capture [2].

Once we will use the standardized behavior in bug 1885232, touch input device
users will become harder to click an element which does not have touch event
listeners because touchstart event target which is same as the pointerdown
event target is not retargeted and it becomes the following click event
target.

Therefore, single touch start around clickable element should be retargeted to
the element if there is no touchable element.

Depends on D245685

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/c0034a4f73bc Make `FindFrameTargetedByInputEvent()` refer clickable ancestors too for single touch start r=smaug
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch

It seems that this fix made it easier to tap/click a button next to links. Previously, a single tap was consumed by the link even if I tapped the other side of the button.

QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: