Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GUI): disallow reloading the app in macOS using Cmd+R (#1219)
Users can currently force the browser window to reload by using Cmd+R in macOS. The `will-navigate` event handler in this same file is supposed to protect us from this case, however it's not fired at all just in macOS for some reason. As a solution, we attach dummy keyboard shortcut handlers for Cmd+R, Ctrl+R, and F5, to override the normal browser window behaviour. The reason behind disallowing reloads is that a reload during a critical operation such as writing, validation, elevating, unmounting, drive scanning, etc will cause undefined behaviour, resulting in nonsense errors that we can't solve coming to TrackJS. See: electron/electron#8841 Fixes: #1210 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
- Loading branch information