SDA-4563 - Ignore changing zoom if focused window is notification window (#2146)

This commit is contained in:
Kiran Niranjan 2024-05-07 20:55:16 +05:30 committed by GitHub
parent e6cdae2b68
commit a9f3887d55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -858,6 +858,13 @@ export const zoomIn = () => {
return; return;
} }
if (
(focusedWindow as ICustomBrowserWindow).winName ===
apiName.notificationWindowName
) {
return;
}
let { webContents } = focusedWindow; let { webContents } = focusedWindow;
// If the focused window is mainWindow we should use mainWebContents // If the focused window is mainWindow we should use mainWebContents
@ -946,6 +953,13 @@ export const zoomOut = () => {
return; return;
} }
if (
(focusedWindow as ICustomBrowserWindow).winName ===
apiName.notificationWindowName
) {
return;
}
let { webContents } = focusedWindow; let { webContents } = focusedWindow;
// If the focused window is mainWindow we should use mainWebContents // If the focused window is mainWindow we should use mainWebContents
@ -1031,6 +1045,12 @@ export const resetZoomLevel = () => {
if (!focusedWindow || !windowExists(focusedWindow)) { if (!focusedWindow || !windowExists(focusedWindow)) {
return; return;
} }
if (
(focusedWindow as ICustomBrowserWindow).winName ===
apiName.notificationWindowName
) {
return;
}
let { webContents } = focusedWindow; let { webContents } = focusedWindow;
// If the focused window is mainWindow we should use mainWebContents // If the focused window is mainWindow we should use mainWebContents
if ( if (