mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-14 00:34:18 +00:00
InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. (#2321, #787)
This commit is contained in:
parent
158995f271
commit
fb4f1ff7f6
4 changed files with 10 additions and 3 deletions
|
|
@ -2644,6 +2644,7 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
|||
}
|
||||
g.ActiveId = id;
|
||||
g.ActiveIdAllowNavDirFlags = 0;
|
||||
g.ActiveIdBlockNavInputFlags = 0;
|
||||
g.ActiveIdAllowOverlap = false;
|
||||
g.ActiveIdWindow = window;
|
||||
if (id)
|
||||
|
|
@ -7630,7 +7631,8 @@ static void ImGui::NavUpdate()
|
|||
{
|
||||
if (g.ActiveId != 0)
|
||||
{
|
||||
ClearActiveID();
|
||||
if (!(g.ActiveIdBlockNavInputFlags & (1 << ImGuiNavInput_Cancel)))
|
||||
ClearActiveID();
|
||||
}
|
||||
else if (g.NavWindow && (g.NavWindow->Flags & ImGuiWindowFlags_ChildWindow) && !(g.NavWindow->Flags & ImGuiWindowFlags_Popup) && g.NavWindow->ParentWindow)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue