mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-05 09:26:34 +00:00
closes #8713 - Fixed profile context menu not showing, c=common, t=fix
This commit is contained in:
@@ -1045,12 +1045,12 @@ var gZenCKSSettings = {
|
||||
const modifiersActive = modifiers.areAnyActive();
|
||||
|
||||
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-not-set`);
|
||||
|
||||
|
||||
// First, try to read the *physical* key via event.code.
|
||||
// If event.code is like "KeyS", "KeyA", ..., strip off "Key" → "S".
|
||||
// Otherwise, fall back to event.key (e.g. "F5", "Enter", etc.).
|
||||
let shortcut;
|
||||
if (event.code && event.code.startsWith("Key")) shortcut = event.code.slice(3);
|
||||
if (event.code && event.code.startsWith('Key')) shortcut = event.code.slice(3);
|
||||
else shortcut = event.key;
|
||||
|
||||
shortcut = shortcut.replace(/Ctrl|Control|Shift|Alt|Option|Cmd|Meta/, ''); // Remove all modifiers
|
||||
|
Reference in New Issue
Block a user