Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a config for disabling the window reload #6981

Merged
merged 1 commit into from
Jan 28, 2020

Conversation

kittaakos
Copy link
Contributor

What it does

Set the disallowReloadKeybinding application config to true if you
want to disable the browser window reload with Ctrl/Cmd+R.

The config does not affect the behavior of the app if it is running
in a browser environment.

How to test

Modify your package.json for the electron example, and try to reload with Ctrl/Cmd+R:

git diff ./examples/electron/package.json 
diff --git a/examples/electron/package.json b/examples/electron/package.json
index ffb2ba700..b5271db01 100644
--- a/examples/electron/package.json
+++ b/examples/electron/package.json
@@ -7,7 +7,8 @@
     "target": "electron",
     "frontend": {
       "config": {
-        "applicationName": "Theia Electron Example"
+        "applicationName": "Theia Electron Example",
+        "disallowReloadKeybinding": true
       }
     }
   },

Review checklist

Reminder for reviewers

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked for me as described after running yarn --cwd examples/electron build.

dev-packages/application-package/src/application-props.ts Outdated Show resolved Hide resolved
Set the `disallowReloadKeybinding` application config to `true` if you
want to disable the browser window reload with `Ctrl/Cmd+R`.

The config does not affect the behavior of the app if it is running
in a browser environment.

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos force-pushed the electron-reload-window branch from c8abe67 to f0a75e3 Compare January 28, 2020 09:04
@kittaakos kittaakos merged commit 2387556 into master Jan 28, 2020
@kittaakos kittaakos deleted the electron-reload-window branch January 28, 2020 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants