From 2315b9f33dff22e3af7eee1192f529ad67d3a785 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 20 Mar 2026 15:47:26 +0100 Subject: [PATCH] InputTextMultiline: fixed an issue where edit buffer wouldn't be reapplied to back buffer on the IsItemDeactivatedAfterEdit() frame. (#9308, #8915, #8273) --- docs/CHANGELOG.txt | 4 ++++ imgui_widgets.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 8fabf7964..6606c10d8 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -88,6 +88,10 @@ Other Changes: large amount of text. - InputTextMultiline: avoid going through reactivation code and fixed losing revert value when activating scrollbar. + - InputTextMultiline: fixed an issue where edit buffer wouldn't be reapplied to back + buffer on the IsItemDeactivatedAfterEdit() frame. This could create issues when + using the idiom of not applying edits before IsItemDeactivatedAfterEdit(). + (#9308, #8915, #8273) - Style: - Border sizes are now scaled (and rounded) by ScaleAllSizes(). - When using large values with ScallAllSizes(), the following items thickness diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 8898e69ae..3022950e2 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -4731,6 +4731,11 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ draw_window->DC.NavLayersActiveMaskNext |= (1 << draw_window->DC.NavLayerCurrent); // This is to ensure that EndChild() will display a navigation highlight so we can "enter" into it. draw_window->DC.CursorPos += style.FramePadding; inner_size.x -= draw_window->ScrollbarSizes.x; + + // FIXME: Could this be a ImGuiChildFlags to affect the SetLastItemDataForWindow() call? + g.LastItemData.ID = id; + g.LastItemData.ItemFlags = item_data_backup.ItemFlags; + g.LastItemData.StatusFlags = item_data_backup.StatusFlags; } else {