@lvce-editor/title-bar-worker 4.20.0 → 4.20.1

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.
@@ -4976,8 +4976,20 @@ const handleFocus = async state => {
4976
4976
  };
4977
4977
 
4978
4978
  const handleFocusOut = async state => {
4979
- // The renderer process checks relatedTarget and closes the menu only when focus leaves the complete menu tree.
4980
- return state;
4979
+ const {
4980
+ isMenuOpen
4981
+ } = state;
4982
+ if (isMenuOpen) {
4983
+ return state;
4984
+ }
4985
+ const closedState = closeMenu(state, /* keepFocus */false);
4986
+ if (!closedState.focused) {
4987
+ return closedState;
4988
+ }
4989
+ return {
4990
+ ...closedState,
4991
+ focused: false
4992
+ };
4981
4993
  };
4982
4994
 
4983
4995
  const openMenu = async (state, focus) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/title-bar-worker",
3
- "version": "4.20.0",
3
+ "version": "4.20.1",
4
4
  "description": "Title Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",