Skip to content

Commit

Permalink
InputTextMultiline(): fix so that IsItemActive() can be used afterwar…
Browse files Browse the repository at this point in the history
…ds (otherwise the info was lost by using child/group)
  • Loading branch information
ocornut committed Jul 14, 2016
1 parent c0f77f1 commit 81036ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8111,6 +8111,8 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
Dummy(text_size + ImVec2(0.0f, g.FontSize)); // Always add room to scroll an extra line
EndChildFrame();
EndGroup();
if (g.ActiveId == id || is_currently_scrolling) // Set LastItemId which was lost by EndChild/EndGroup, so user can use IsItemActive()
window->DC.LastItemId = g.ActiveId;
}

if (is_password)
Expand Down

0 comments on commit 81036ee

Please sign in to comment.