mirror of
https://github.com/vector-im/element-desktop.git
synced 2024-09-17 01:35:12 +00:00
Merge pull request #215 from alarsyo/develop
This commit is contained in:
commit
6b4e6f6be6
1 changed files with 2 additions and 1 deletions
|
@ -264,7 +264,8 @@ const exitShortcuts = [
|
||||||
|
|
||||||
const warnBeforeExit = (event, input) => {
|
const warnBeforeExit = (event, input) => {
|
||||||
const shouldWarnBeforeExit = store.get('warnBeforeExit', true);
|
const shouldWarnBeforeExit = store.get('warnBeforeExit', true);
|
||||||
const exitShortcutPressed = exitShortcuts.some(shortcutFn => shortcutFn(input, process.platform));
|
const exitShortcutPressed =
|
||||||
|
input.type === 'keyDown' && exitShortcuts.some(shortcutFn => shortcutFn(input, process.platform));
|
||||||
|
|
||||||
if (shouldWarnBeforeExit && exitShortcutPressed) {
|
if (shouldWarnBeforeExit && exitShortcutPressed) {
|
||||||
const shouldCancelCloseRequest = dialog.showMessageBoxSync(mainWindow, {
|
const shouldCancelCloseRequest = dialog.showMessageBoxSync(mainWindow, {
|
||||||
|
|
Loading…
Reference in a new issue