From 3f073056ded3b3f33f9e79283788fd5f15e976e0 Mon Sep 17 00:00:00 2001 From: Martok Date: Sun, 27 Nov 2022 16:35:46 +0100 Subject: [PATCH] Issue #2030 - Pref-gate default button event dispatch logic --- layout/style/res/forms.css | 10 ++++++++++ modules/libpref/init/all.js | 3 +++ 2 files changed, 13 insertions(+) diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index a808822c89..fcf5874829 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -699,6 +699,16 @@ button { justify-items: inherit; } +@supports -moz-bool-pref("dom.forms.button.standards_compliant") { + /* + * Button content does historically not receive pointer events. + * This pref is enabled by default and can disabled to get Webkit behavior. + */ + button * { + pointer-events: none !important; + } +} + button:hover, input[type="color"]:-moz-system-metric(color-picker-available):hover, input[type="reset"]:hover, diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index e8419d664b..0ef3903c22 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1198,6 +1198,9 @@ pref("dom.forms.datetime.timepicker", false); // TODO: implement/fix these. pref("dom.forms.datetime.others", false); +//