Open Bug 1648124 Opened 4 years ago Updated 11 months ago

Click event not firing for links without href inside iframe with CSS transformations

Categories

(Core :: DOM: Events, defect)

Unspecified
All
defect

Tracking

()

Webcompat Priority P3

People

(Reporter: denschub, Unassigned)

References

()

Details

Attachments

(1 file)

Open testcase at http://mozilla-webcompat-54522.glitch.me (testcase code here), and try to click on one of the two bottom links without a href attribute. On Desktop, you will see alert boxes for all three <a> tags. However, on GeckoView, only the link with a href attribute seems to emit the click event.

This appears to fail because the iFrame has transform: translate(50px, 50px); applied. Without the CSS transformation, the click events get fired. Note that the link with a href tag works fine in all cases.

This works fine on Desktop, but is broken in all GeckoView products.

I provided a wrong testcase link by accident in my first post. I edited the post, but just in case someone is only reading emails, this is the correct link to the testcase: http://mozilla-webcompat-54522.glitch.me/

Component: General → Layout
Product: GeckoView → Core

Mouse event fluffing not accounting for transforms or something like that?

Interesting. Turning off fluffing does seem to fix it on Fenix. On Fennec it works with and without fluffing. So maybe related to e10s + fluffing?

Severity: -- → S3

I reproduced in GVE and verified that the PositionedEventTargeting code seems to be producing the right result. That is, for each of the mousemove/mousedown/mouseup events, it detects the right frame (corresponding to the anchor element) as the final target. However, the order of things happening seems messed up.

This is what I would expect to see if I click on the "a with role" anchor:

  • PositionedEventTargeting gets eMouseMove
  • mousemove dispatched to anchor "a with role"
  • PositionedEventTargeting gets eMouseDown
  • mousedown dispatched to anchor "a with role"
  • PositionedEventTargeting gets eMouseUp
  • mouseup dispatched to anchor "a with role"
  • click dispatched to anchor "a with role"

But based on printf what I see actually happening:

  • PositionedEventTargeting gets eMouseMove
  • mousemove dispatched to anchor "a with role"
  • PositionedEventTargeting gets eMouseDown
  • mouseup dispatched to anchor "a with role"
  • PositionedEventTargeting gets eMouseUp
  • mousedown dispatched to anchor "a with href"

This seems pretty weird, so I looked for other related prefs that might be in play here. I found dom.w3c_pointer_events.multiprocess.android.enabled and flipped that to false. That stopped the mousedown and mouseup events from getting to content entirely. So that at least seems related somehow. Given this seems like some sort of event handling bug I'm going to move this over to that component.

Component: Layout → DOM: Events
Webcompat Priority: ? → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: