@lvce-editor/renderer-process 30.32.1 → 30.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8244,15 +8244,11 @@ const isInsideTitleBarMenu = $Element => {
|
|
|
8244
8244
|
};
|
|
8245
8245
|
const handleFocusOut = event => {
|
|
8246
8246
|
const {
|
|
8247
|
-
relatedTarget
|
|
8248
|
-
target
|
|
8247
|
+
relatedTarget
|
|
8249
8248
|
} = event;
|
|
8250
8249
|
if (relatedTarget && isInsideTitleBarMenu(relatedTarget)) {
|
|
8251
8250
|
return;
|
|
8252
8251
|
}
|
|
8253
|
-
if (target && isInsideTitleBarMenu(target)) {
|
|
8254
|
-
return;
|
|
8255
|
-
}
|
|
8256
8252
|
const uid = fromEvent(event);
|
|
8257
8253
|
closeMenu$1(uid);
|
|
8258
8254
|
};
|
|
@@ -9489,6 +9485,12 @@ const toggleFullScreen = () => {
|
|
|
9489
9485
|
}
|
|
9490
9486
|
return document.documentElement.requestFullscreen();
|
|
9491
9487
|
};
|
|
9488
|
+
const handleFullScreenChange = isFullScreen => {
|
|
9489
|
+
send('Layout.handleFullScreenChange', isFullScreen);
|
|
9490
|
+
};
|
|
9491
|
+
const handleDocumentFullScreenChange = () => {
|
|
9492
|
+
handleFullScreenChange(Boolean(document.fullscreenElement));
|
|
9493
|
+
};
|
|
9492
9494
|
const sendVisibilityChangeHint = () => {
|
|
9493
9495
|
send(/* SaveState.handleVisibilityChange */'SaveState.handleVisibilityChange', /* visibilityState */'hidden');
|
|
9494
9496
|
};
|
|
@@ -9504,6 +9506,7 @@ const handlePointerLeave = () => {
|
|
|
9504
9506
|
// beforeunload event has the same problem, pointerleave event sometimes works
|
|
9505
9507
|
const onVisibilityChange = () => {
|
|
9506
9508
|
window.addEventListener('beforeunload', handleBeforeUnload);
|
|
9509
|
+
document.addEventListener('fullscreenchange', handleDocumentFullScreenChange);
|
|
9507
9510
|
document.addEventListener('pointerleave', handlePointerLeave);
|
|
9508
9511
|
};
|
|
9509
9512
|
|
|
@@ -9899,6 +9902,7 @@ const commandMap = {
|
|
|
9899
9902
|
'WebView.loadOnly': loadOnly,
|
|
9900
9903
|
'WebView.setPort': setPort,
|
|
9901
9904
|
'Window.close': close,
|
|
9905
|
+
'Window.handleFullScreenChange': handleFullScreenChange,
|
|
9902
9906
|
'Window.maximize': maximize,
|
|
9903
9907
|
'Window.minimize': minimize,
|
|
9904
9908
|
'Window.onVisibilityChange': onVisibilityChange,
|