diff options
Diffstat (limited to 'src/models/Service.ts')
-rw-r--r-- | src/models/Service.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/models/Service.ts b/src/models/Service.ts index a61df5570..ae04b8b58 100644 --- a/src/models/Service.ts +++ b/src/models/Service.ts | |||
@@ -7,6 +7,7 @@ import type ElectronWebView from 'react-electron-web-view'; | |||
7 | import { v4 as uuidV4 } from 'uuid'; | 7 | import { v4 as uuidV4 } from 'uuid'; |
8 | import { needsToken } from '../api/apiBase'; | 8 | import { needsToken } from '../api/apiBase'; |
9 | import { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } from '../config'; | 9 | import { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } from '../config'; |
10 | import { isMac } from '../environment'; | ||
10 | import { todosStore } from '../features/todos'; | 11 | import { todosStore } from '../features/todos'; |
11 | import { getFaviconUrl } from '../helpers/favicon-helpers'; | 12 | import { getFaviconUrl } from '../helpers/favicon-helpers'; |
12 | import { isValidExternalURL, normalizedUrl } from '../helpers/url-helpers'; | 13 | import { isValidExternalURL, normalizedUrl } from '../helpers/url-helpers'; |
@@ -536,6 +537,18 @@ export default class Service { | |||
536 | }); | 537 | }); |
537 | 538 | ||
538 | if (webviewWebContents) { | 539 | if (webviewWebContents) { |
540 | // TODO: Modify this logic once https://github.com/electron/electron/issues/40674 is fixed | ||
541 | // This is a workaround for the issue where the zoom in shortcut is not working | ||
542 | if (!isMac) { | ||
543 | webviewWebContents.on('before-input-event', (event, input) => { | ||
544 | if (input.control && input.key === '+' && input.type === 'keyDown') { | ||
545 | event.preventDefault(); | ||
546 | const currentZoom = this.webview?.getZoomLevel(); | ||
547 | this.webview?.setZoomLevel(currentZoom + 0.5); | ||
548 | } | ||
549 | }); | ||
550 | } | ||
551 | |||
539 | webviewWebContents.session.on('will-download', (event, item) => { | 552 | webviewWebContents.session.on('will-download', (event, item) => { |
540 | event.preventDefault(); | 553 | event.preventDefault(); |
541 | 554 | ||