Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): browser preview viewport no longer scales with window zoom #14281

ClosedmmmattG(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/14281/headopened View on GitHub

Showing 8 changed files with 9 additions and 2 deletions (loading 5).

x
0 of 8 viewed, 8 left
1 addition and 0 deletionsapps/desktop/src/preload.tsModified
View file
@@ -72,6 +72,7 @@
},
getPathForFile: (file: File) => webUtils.getPathForFile(file),
getClientPlatform: () => clientPlatform,
+ getZoomFactor: () => webFrame.getZoomFactor(),
setNotificationBadge: (badge) =>
ipcRenderer.invoke(IpcChannels.SET_NOTIFICATION_BADGE_CHANNEL, badge),
onNotificationBadgeClear: (listener) => {
2 additions and 0 deletionsapps/web/src/browser/HostedBrowserWebview.test.tsxModified
View file
@@ -77,6 +77,8 @@
});
vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
vi.stubGlobal("window", globalThis);
+ vi.stubGlobal("addEventListener", vi.fn());
+ vi.stubGlobal("removeEventListener", vi.fn());
vi.stubGlobal("navigator", { platform: "Linux" });
vi.stubGlobal(
"requestAnimationFrame",
6 additions and 2 deletionsapps/web/src/browser/HostedBrowserWebview.tsxModified
View file
@@ -22,6 +22,7 @@
import { resolveHostedBrowserWebviewWrapperStyle } from "./hostedBrowserWebviewStyle";
import { usePreviewWebviewConfig } from "./previewWebviewConfigState";
import { useBrowserViewportResize } from "./useBrowserViewportResize";
+import { usePreviewPageScale } from "./usePreviewPageScale";