Closed Bug 1501774 Opened 6 years ago Closed 6 years ago

click event not firing when element gets `will-change: transform` (frame reconstruct) between mousedown and mouseup

Categories

(Core :: Layout, defect, P3)

36 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1497524
Tracking Status
firefox-esr60 --- wontfix
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- affected

People

(Reporter: myfrom.13th, Unassigned)

References

Details

(Keywords: parity-chrome, parity-edge)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36

Steps to reproduce:

This bug appears to be related to specific markups and styles combinations.

I'm able to reproduce with an element that is absolutely positioned within its parent and has a ::before pseudo-element with a letter as content.
I know it also happens with web component paper-input (https://www.webcomponents.org/element/@polymer/paper-input)

In those cases, if you add two listeners to the parent of aforementioned element:
 1) `mousedown` in which you add `will-change: transform;` to parent and 
 2) `mouseup` in which you remove the style from the element,
after clicking in my case on the ::before pseudo-element's content (letter "X" in demo), the click event for the element (not parent, element) will not fire; in paper-input case, clicking the input field will not focus it. Clicking on padding, margin or border of the element, or outside ::before does work properly.

Demo: https://jsfiddle.net/myfrom/e5Lvukqn/3/

Sorry for so much complication but I wasn't able to reproduce it with simpler markup/styles.


Actual results:

Click event wasn't fired


Expected results:

Click event is fired just as with clicks outside ::before but still inside the element
Component: Untriaged → DOM: Events
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: will-change
Version: 62 Branch → 36 Branch
Component: DOM: Events → Layout
I wonder if bug 1089326 actually fixes this.
Priority: -- → P3
Adding "will-change: transform" to an element with abs-pos (or fixed-pos) children would trigger reframe on it, which may mean that the pseudo-element is reconstructed (IIRC?). Not sure what's the best way to handle this case, nor whether it's Layout or DOM should be responsible...
Summary: click event not firing when element gets `will-change: transform` between mousedown and mouseup → click event not firing when element gets `will-change: transform` (frame reconstruct) between mousedown and mouseup
I'm moderately sure this is a dupe of bug 1497524.
See Also: → 1497524
Attached file Reduced testcase.
Should log `click` when clicking on the 'X', but that's not the case.
Attachment #9022458 - Attachment mime type: text/plain → text/html
I
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: