Closed Bug 1585880 Opened 5 years ago Closed 5 years ago

"pointer-events: none" does not affect to scrollbars generated by "overflow" property

Categories

(Core :: Layout, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla72
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 + fixed
firefox72 --- fixed

People

(Reporter: yuki, Assigned: heycam)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached file A testcase HTML file (deleted) β€”
  1. Put an HTML element in the document. Assume that this is the "background".
  2. Add style declarations to apply different background color for the "background" element, with the ":hover" pseudo class.
  3. Put another HTML element in the document. Assume that this is the "foreground".
  4. Add style declarations to apply styles for the "foreground" element to do following:
    • Put the element over the "background" element and set its size to cover the "background" completely.
    • Set the "pointer-events" to "none".
    • Set "overflow" (or other properties) to put visible scrollbars in it.
  5. Move the mouse pointer acrossing the "foreground" element.

Actual result

The "background" element is shown with special background color declared with ":hover" pseudo class, only when the pointer is on the blank area of the "foreground" element.
The "background" element is shown with its default background color, when the pointer is on scrollbars in the "foreground" element.

Expected result

The "background" element is shown with special background color on both cases: when the pointer is on the blank area of the "foreground" element, or the pointer is on scrollbars.

Compatibility and versions of Firefox

  • Google Chrome (Chromiumu): got the expected result.
  • Firefox 69.0.1: got the actual result.
  • Nightly 71.0a1: got the actual result.

Tested environment

  • Windows 10 64bit

I think that the bug 1508789 may be related with this.

I forgot to write a possible important topic: this problem affects to both CSS and DOM events. The uploaded testcase is also including codes to apply special background color for a while by clicking on the "foreground" element.

Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
Regressed by: 1554571
Component: DOM: Events → Layout

Thanks Alice!

pointer-events CSS property isn't a DOM Events thingie, but a CSS/layout thingie.
-> Layout

Flags: needinfo?(cam)
Priority: -- → P2

Thanks, I guess this is probably due to the scroll bar style caching, and like visibility, we need to key the cached styles off the inherited pointer-events value too.

Like visibility, we rely on pointer-events values inheriting down into
scrollbar part elements. So don't cached NAC styles for scrollbar parts
if we have a non-initial value for pointer-events, and adjust the UA
style sheet rules to ensure it is always inherited.

Assignee: nobody → cam
Status: NEW → ASSIGNED
Flags: needinfo?(cam)

Comment on attachment 9101425 [details]
Bug 1585880 - Ensure pointer-events inherits into scrollbar parts.

Beta/Release Uplift Approval Request

  • User impact if declined: The scrollbars on scrollable elements that are pointer-events: none can still be interacted with.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a pretty small change to opt out of an optimization in a specific case.

I've tested the patch works manually on my local m-c build.

  • String changes made/needed:
Attachment #9101425 - Flags: approval-mozilla-beta?

(Let's wait for it to land in Nightly before taking it to a beta builld)

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/7932e22365f4
Ensure pointer-events inherits into scrollbar parts. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Cameron, aren't the testcase and instructions in comment #0 good STR that our QA could use to verify the patch in Nightly? Given that it has no tests and that we have shipped 2 releases with the bug, I would prefer some minimal outside testing and a few days of bake time on nightly before uplifting it to beta.

Flags: needinfo?(cam)

Yuki, could you confirm that the issue is fixed for you with the latest nightly please? Thanks

Flags: needinfo?(yuki)

OK, I've confirmed the original issue I saw doesn't happen anymore on Nightly 72.0a1 build ID 20191024082835.

Status: RESOLVED → VERIFIED
Flags: needinfo?(yuki)

Comment on attachment 9101425 [details]
Bug 1585880 - Ensure pointer-events inherits into scrollbar parts.

Fix for a P2 regression in layout, patch estimated as low risk by the developer, was on nightly for a few days with no other regression reported and the reporter confirmed the fix on Nightly, approved for 71 beta 5, thanks.

Attachment #9101425 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: needinfo?(cam)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: