closes #8713 - Fixed profile context menu not showing, c=common, t=fix

This commit is contained in:
Mr. M
2025-05-31 22:16:05 +02:00
parent 9bfa7b01b5
commit c9fe95c00c
2 changed files with 9 additions and 3 deletions

View File

@@ -1050,7 +1050,7 @@ var gZenCKSSettings = {
// If event.code is like "KeyS", "KeyA", ..., strip off "Key" → "S". // If event.code is like "KeyS", "KeyA", ..., strip off "Key" → "S".
// Otherwise, fall back to event.key (e.g. "F5", "Enter", etc.). // Otherwise, fall back to event.key (e.g. "F5", "Enter", etc.).
let shortcut; 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; else shortcut = event.key;
shortcut = shortcut.replace(/Ctrl|Control|Shift|Alt|Option|Cmd|Meta/, ''); // Remove all modifiers shortcut = shortcut.replace(/Ctrl|Control|Shift|Alt|Option|Cmd|Meta/, ''); // Remove all modifiers

View File

@@ -3,6 +3,8 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
const lazy = {}; const lazy = {};
var { AppConstants } = ChromeUtils.importESModule('resource://gre/modules/AppConstants.sys.mjs');
ChromeUtils.defineESModuleGetters(lazy, { ChromeUtils.defineESModuleGetters(lazy, {
BrowserWindowTracker: 'resource:///modules/BrowserWindowTracker.sys.mjs', BrowserWindowTracker: 'resource:///modules/BrowserWindowTracker.sys.mjs',
}); });
@@ -13,7 +15,11 @@ class ZenUIMigration {
init(isNewProfile, win) { init(isNewProfile, win) {
if (!isNewProfile) { if (!isNewProfile) {
this._migrate(win); try {
this._migrate(win);
} catch (e) {
console.error('ZenUIMigration: Error during migration', e);
}
} }
this.clearVariables(); this.clearVariables();
} }