You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix menubar state machine bug: prevent OPEN state without focusedMenu
- Add validation in focusState setter to ensure focusedMenu is set before allowing OPEN state
- Prevents crash when accessing this.focusedMenu.index in showCustomMenu
- Add defensive checks as safety net (defense in depth)
- Fixes Windows-only bug where clicking File/Edit/etc menus would crash
- Maintains Windows-specific stacking context logic (document.body appendChild)
Root cause: focusState setter allowed OPEN state transition without validating
that focusedMenu was set, creating inconsistent state machine state.
0 commit comments