From b1bcbef11a094500a9e7ea47a9ee2b77dc7d2722 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Tue, 23 Jun 2020 18:09:49 +0530 Subject: [PATCH] fix: SDA-2215: macos preference override (#1023) * SDA-2215: set macOS double space period preference to false * SDA-2215: set macOS double space period preference to false --- src/app/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/main.ts b/src/app/main.ts index 12da0d36..bd31e640 100644 --- a/src/app/main.ts +++ b/src/app/main.ts @@ -1,4 +1,4 @@ -import { app } from 'electron'; +import { app, systemPreferences } from 'electron'; import * as electronDownloader from 'electron-dl'; import * as shellPath from 'shell-path'; @@ -15,6 +15,10 @@ import { handlePerformanceSettings } from './perf-handler'; import { protocolHandler } from './protocol-handler'; import { ICustomBrowserWindow, windowHandler } from './window-handler'; +// Set automatic period substitution to false because of a bug in draft js on the client app +// See https://perzoinc.atlassian.net/browse/SDA-2215 for more details +systemPreferences.setUserDefault('NSAutomaticPeriodSubstitutionEnabled', 'string', 'false'); + logger.info(`App started with the args ${JSON.stringify(process.argv)}`); const allowMultiInstance: string | boolean = getCommandLineArgs(process.argv, '--multiInstance', true) || isDevEnv;