commit f88d481b81078d7e8ce07d099579c2449f3759a7
parent 9e847c99415470e95924c4ddce1d67f45d6afd79
Author: Simon Farre <sfarre@mozilla.com>
Date: Thu, 8 Jan 2026 14:54:16 +0000
Bug 2001938 - Shortcut keys in combination with modifier should create UA r=edgar
ctrl+f5 which is used by google slides to go fullscreen is blocked
because we don't consider keys bound to shortcuts that also is overriden
by modifiers to be able to cause user gesture activation.
Differential Revision: https://phabricator.services.mozilla.com/D274517
Diffstat:
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/dom/base/test/useractivation/browser_useractivation_key_events.js b/dom/base/test/useractivation/browser_useractivation_key_events.js
@@ -68,8 +68,8 @@ add_task(async function TestPrintableKey() {
add_task(async function TestNonPrintableKey() {
let tests = [
["KEY_Backspace", false],
- ["KEY_Control", false],
- ["KEY_Shift", false],
+ ["KEY_Control", true],
+ ["KEY_Shift", true],
["KEY_Escape", false],
// Treat as user input
["KEY_Tab", true],
diff --git a/widget/TextEvents.h b/widget/TextEvents.h
@@ -310,10 +310,6 @@ class WidgetKeyboardEvent final : public WidgetInputEvent {
}
bool CanUserGestureActivateTarget() const {
- if (IsModifierKeyEvent()) {
- return false;
- }
-
if (mFlags.mIsShortcutKey) {
// Space is quite common shortcut for playing media.
return mKeyCode == NS_VK_SPACE ||