Skip to content

Commit

Permalink
Nav: clear activeid on menu toggle (so pressing Alt leaving an InputT…
Browse files Browse the repository at this point in the history
…ext will steal ActiveID. Previously wouldn't not, but ButtonBehavior() hover logic would not show Menu layer item as hovered when ActiveId != 0). (#787)

(Adjacent to #370)
  • Loading branch information
ocornut committed Apr 23, 2021
1 parent e61e8ae commit 4540177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Other Changes:
- Scrolling: Fix mouse wheel axis swap when using SHIFT on macOS (system already does it). (#4010)
- Window: Fix IsWindowAppearing() from returning true twice in most cases. (#3982, #1497, #1061)
- Nav: Fixed using SetItemDefaultFocus() on windows with _NavFlattened flag.
- Nav: Fixed toggling menu layer while an InputText() is active not stealing active id.
- Tables: Expose TableSetColumnEnabled() in public api. (#3935)
- Tables: Better preserve widths when columns count changes. (#4046)
- TabBar: Fixed mouse reordering with very fast movements (e.g. crossing multiple tabs in a single
Expand Down
2 changes: 2 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9648,6 +9648,8 @@ static void ImGui::NavUpdateWindowing()
// Apply menu/layer toggle
if (apply_toggle_layer && g.NavWindow)
{
ClearActiveID();

// Move to parent menu if necessary
ImGuiWindow* new_nav_window = g.NavWindow;
while (new_nav_window->ParentWindow
Expand Down

0 comments on commit 4540177

Please sign in to comment.