SDA-3219 Disabling aux click (#1369)

This commit is contained in:
Salah Benmoussati 2022-04-05 09:53:48 +02:00 committed by GitHub
parent 2394db9278
commit 580c87fbab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -108,7 +108,7 @@ export const DEFAULT_WELCOME_SCREEN_HEIGHT: number = 333;
export const TITLE_BAR_HEIGHT: number = 32;
export const IS_SAND_BOXED: boolean = true;
export const IS_NODE_INTEGRATION_ENABLED: boolean = false;
export const AUX_CLICK = 'Auxclick';
// Timeout on restarting SDA in case it's stuck
const LISTEN_TIMEOUT: number = 25 * 1000;
@ -741,6 +741,7 @@ export class WindowHandler {
nodeIntegration: IS_NODE_INTEGRATION_ENABLED,
preload: path.join(__dirname, '../renderer/_preload-component.js'),
devTools: isDevEnv,
disableBlinkFeatures: AUX_CLICK,
},
}) as ICustomBrowserView;
const titleBarWindowUrl = format({
@ -2195,6 +2196,7 @@ export class WindowHandler {
contextIsolation: this.contextIsolation,
backgroundThrottling: this.backgroundThrottling,
enableRemoteModule: true,
disableBlinkFeatures: AUX_CLICK,
},
...webPreferences,
};

View File

@ -35,6 +35,7 @@ import { memoryMonitor } from './memory-monitor';
import { screenSnippet } from './screen-snippet-handler';
import { updateAlwaysOnTop } from './window-actions';
import {
AUX_CLICK,
DEFAULT_HEIGHT,
DEFAULT_WIDTH,
ICustomBrowserView,
@ -189,6 +190,7 @@ export const createComponentWindow = (
nodeIntegration: IS_NODE_INTEGRATION_ENABLED,
preload: path.join(__dirname, '../renderer/_preload-component.js'),
devTools: isDevEnv,
disableBlinkFeatures: AUX_CLICK,
},
};
@ -1127,6 +1129,7 @@ export const loadBrowserViews = async (
nodeIntegration: IS_NODE_INTEGRATION_ENABLED,
preload: path.join(__dirname, '../renderer/_preload-component.js'),
devTools: isDevEnv,
disableBlinkFeatures: AUX_CLICK,
},
}) as ICustomBrowserView;
const mainWindowBounds = windowHandler.getMainWindow()?.getBounds();

View File

@ -7,6 +7,7 @@ import {
} from '../app/analytics-handler';
import { config } from '../app/config-handler';
import {
AUX_CLICK,
IS_NODE_INTEGRATION_ENABLED,
IS_SAND_BOXED,
} from '../app/window-handler';
@ -624,6 +625,7 @@ class Notification extends NotificationHandler {
sandbox: IS_SAND_BOXED,
nodeIntegration: IS_NODE_INTEGRATION_ENABLED,
devTools: true,
disableBlinkFeatures: AUX_CLICK,
},
};
}