@@ -15,6 +15,7 @@ import {
1515 handleCtrlShiftFocus ,
1616 handleCtrlShiftState ,
1717 increaseZoomLevel ,
18+ resetZoomLevel ,
1819 shFrameNavHandler ,
1920 shNavHandler ,
2021} from "./emain-util" ;
@@ -48,8 +49,7 @@ function handleWindowsMenuAccelerators(
4849 }
4950
5051 if ( checkKeyPressed ( waveEvent , "Ctrl:0" ) ) {
51- tabView . webContents . setZoomFactor ( 1 ) ;
52- tabView . webContents . send ( "zoom-factor-change" , 1 ) ;
52+ resetZoomLevel ( tabView . webContents ) ;
5353 return true ;
5454 }
5555
@@ -165,7 +165,7 @@ export class WaveTabView extends WebContentsView {
165165 removeWaveTabView ( this . waveTabId ) ;
166166 this . isDestroyed = true ;
167167 } ) ;
168- this . webContents . on ( "zoom-changed" , ( _event , zoomDirection ) => {
168+ this . webContents . on ( "zoom-changed" , ( _event , _zoomDirection ) => {
169169 this . webContents . send ( "zoom-factor-change" , this . webContents . getZoomFactor ( ) ) ;
170170 } ) ;
171171 this . setBackgroundColor ( computeBgColor ( fullConfig ) ) ;
@@ -339,9 +339,6 @@ export async function getOrCreateWebViewForTab(waveWindowId: string, tabId: stri
339339 }
340340 }
341341 } ) ;
342- tabView . webContents . on ( "zoom-changed" , ( e ) => {
343- tabView . webContents . send ( "zoom-changed" ) ;
344- } ) ;
345342 tabView . webContents . setWindowOpenHandler ( ( { url, frameName } ) => {
346343 if ( url . startsWith ( "http://" ) || url . startsWith ( "https://" ) || url . startsWith ( "file://" ) ) {
347344 console . log ( "openExternal fallback" , url ) ;
0 commit comments