fix: restore native text context menu

This commit is contained in:
2026-09-07 17:07:57 +08:00
parent 8c13ae76db
commit 813d1ca02e
6 changed files with 355 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import { join } from 'node:path';
import { registerIpcHandlers } from './ipc-handlers';
import { createTray } from './tray';
import { createMenu } from './menu';
import { registerTextContextMenu } from './context-menu';
import { registerZoomShortcuts } from './zoom-shortcuts';
import { getNativeWindowMaterialOptions } from './window-material';
@@ -272,6 +273,7 @@ function createWindow(): BrowserWindow {
});
installMediaPermissionHandler(win);
registerTextContextMenu(win);
registerZoomShortcuts(win);
// Handle external links — only allow safe protocols to prevent arbitrary