mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-17 05:15:21 +03:00
Fix Mac OSX Hide command problem
This commit is contained in:
parent
9cedeb23ca
commit
ee4492495c
1 changed files with 7 additions and 0 deletions
|
@ -182,6 +182,13 @@ function startProcess() {
|
||||||
GUI.nwGui.Shell.openExternal(url);
|
GUI.nwGui.Shell.openExternal(url);
|
||||||
});
|
});
|
||||||
nwWindow.on('close', closeHandler);
|
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()) {
|
} else if (GUI.isCordova()) {
|
||||||
window.addEventListener('beforeunload', closeHandler);
|
window.addEventListener('beforeunload', closeHandler);
|
||||||
document.addEventListener('backbutton', function(e) {
|
document.addEventListener('backbutton', function(e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue