From 81036ee46f3009f2bd09060e6503350a66137804 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 14 Jul 2016 13:27:14 +0200 Subject: [PATCH] InputTextMultiline(): fix so that IsItemActive() can be used afterwards (otherwise the info was lost by using child/group) --- imgui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 9e11d8601..ec3111546 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -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)