mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-16 21:05:30 +03:00
Merge pull request #2446 from haslinghuis/fix_mac_hide
This commit is contained in:
commit
251d1bc8ab
1 changed files with 7 additions and 0 deletions
|
@ -179,6 +179,13 @@ function startProcess() {
|
|||
GUI.nwGui.Shell.openExternal(url);
|
||||
});
|
||||
nwWindow.on('close', closeHandler);
|
||||
// TODO: Remove visibilitychange Listener when upgrading to NW2
|
||||
// capture Command H on MacOS and change it to minimize
|
||||
document.addEventListener("visibilitychange", function() {
|
||||
if (GUI.operating_system === "MacOS" && document.visibilityState === "hidden") {
|
||||
nwWindow.minimize();
|
||||
}
|
||||
}, false);
|
||||
} else if (GUI.isCordova()) {
|
||||
window.addEventListener('beforeunload', closeHandler);
|
||||
document.addEventListener('backbutton', function(e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue