mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-01 01:34:57 +08:00
InputTextMultiline: fixed an issue processing deactivation logic when an active multi-line edit is clipped due to being out of view.
This commit is contained in:
@@ -43,6 +43,10 @@ Breaking Changes:
|
|||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
|
|
||||||
|
- InputText:
|
||||||
|
- InputTextMultiline: fixed an issue processing deactivation logic when an active
|
||||||
|
multi-line edit is clipped due to being out of view.
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
VERSION 1.92.7 (Released 2026-04-02)
|
VERSION 1.92.7 (Released 2026-04-02)
|
||||||
|
|||||||
+3
-2
@@ -4709,7 +4709,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|||||||
{
|
{
|
||||||
ImVec2 backup_pos = window->DC.CursorPos;
|
ImVec2 backup_pos = window->DC.CursorPos;
|
||||||
ItemSize(total_bb, style.FramePadding.y);
|
ItemSize(total_bb, style.FramePadding.y);
|
||||||
if (!ItemAdd(total_bb, id, &frame_bb, ImGuiItemFlags_Inputable))
|
bool no_clip = (g.InputTextDeactivatedState.ID == id) || (g.ActiveId == id) || (id == g.NavActivateId); // Mimic some of ItemAdd() logic + add InputTextDeactivatedState.ID check.
|
||||||
|
if (!ItemAdd(total_bb, id, &frame_bb, ImGuiItemFlags_Inputable) && !no_clip)
|
||||||
{
|
{
|
||||||
EndGroup();
|
EndGroup();
|
||||||
return false;
|
return false;
|
||||||
@@ -4735,7 +4736,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|||||||
g.NavActivateId = backup_activate_id;
|
g.NavActivateId = backup_activate_id;
|
||||||
PopStyleVar(3);
|
PopStyleVar(3);
|
||||||
PopStyleColor();
|
PopStyleColor();
|
||||||
if (!child_visible)
|
if (!child_visible && !no_clip)
|
||||||
{
|
{
|
||||||
EndChild();
|
EndChild();
|
||||||
EndGroup();
|
EndGroup();
|
||||||
|
|||||||
Reference in New Issue
Block a user