mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-12 12:47:42 +02:00
browser: drop in-guest zoom locks so pinch and cmd+wheel zoom the page
setVisualZoomLevelLimits(1, 1) blocked pinch-to-zoom inside the webview, and setZoomFactor(1) on every dom-ready reset any user page zoom. Both were added back when canvas zoom was supposed to take over for ctrl+wheel; with that reverted, chromium's native zoom handlers should run unimpeded.
This commit is contained in:
@@ -303,11 +303,6 @@ const BrowserCard: React.FC<Props> = ({
|
||||
// (the historical Windows mount segfault). Clear the crash-safety marker.
|
||||
if (isWindows) markWindowsWebviewSurvived();
|
||||
wv.loadURL(targetUrl).catch(() => {});
|
||||
// Disable in-guest pinch zoom; page zoom (cmd+= / cmd+-) still works via chromium.
|
||||
try {
|
||||
(wv as any).setVisualZoomLevelLimits?.(1, 1);
|
||||
(wv as any).setZoomFactor?.(1);
|
||||
} catch (_) {}
|
||||
};
|
||||
wv.addEventListener('dom-ready', doLoad, { once: true });
|
||||
cleanups.push(() => wv.removeEventListener('dom-ready', doLoad));
|
||||
|
||||
Reference in New Issue
Block a user