Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): hand keyboard focus back after an automation click #10982

ClosedMnigos(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/10982/headopened View on GitHub

Showing 2 changed files with 158 additions and 1 deletion (loading 1).

x
0 of 2 viewed, 2 left
158 additions and 1 deletionapps/desktop/src/preview/Manager.test.tsModified
View file
@@ -180,8 +180,10 @@
browserWindowConstructor,
clipboardItemConstructor,
createFromPath,
+ fromFrame,
fromId,
getFocusedWebContents,
+ getFocusedWindow,
mkdir,
showItemInFolder,
webviewSend,
@@ -189,11 +191,13 @@
writeClipboard,
} = vi.hoisted(() => ({
browserWindowConstructor: vi.fn(),
+ getFocusedWindow: vi.fn<() => Electron.BrowserWindow | null>(() => null),
clipboardItemConstructor: vi.fn(),
createFromPath: vi.fn((): { readonly isEmpty: () => boolean; readonly toPNG: () => Buffer } => ({
isEmpty: () => false,
toPNG: () => Buffer.from("png"),
})),
+ fromFrame: vi.fn<typeof Electron.webContents.fromFrame>(() => undefined),
fromId: vi.fn<(_id?: number) => Electron.WebContents | null>((_id?: number) => null),
getFocusedWebContents: vi.fn(() => null),
mkdir: vi.fn((_path: string) => undefined),
@@ -204,7 +208,7 @@
}));
​