mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-19 07:08:18 +00:00
InputText: reworked so that io.ConfigInputTextEnterKeepActive reactivate in order for e.g. IsItemDeactivatedAfterEdit() to work. Amends. (#9001, #9115)
Rework. Fixes dangling InputTextReactivateId in case of field being hidden on activation.
This commit is contained in:
@@ -4281,7 +4281,7 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
|
||||
MouseStationaryTimer = 0.0f;
|
||||
|
||||
InputTextPasswordFontBackupFlags = ImFontFlags_None;
|
||||
InputTextReactivateID = 0;
|
||||
InputTextReactivateId = 0;
|
||||
TempInputId = 0;
|
||||
memset(&DataTypeZeroValue, 0, sizeof(DataTypeZeroValue));
|
||||
BeginMenuDepth = BeginComboDepth = 0;
|
||||
@@ -5573,6 +5573,8 @@ void ImGui::NewFrame()
|
||||
g.ActiveIdIsJustActivated = false;
|
||||
if (g.TempInputId != 0 && g.ActiveId != g.TempInputId)
|
||||
g.TempInputId = 0;
|
||||
if (g.InputTextReactivateId != 0 && g.InputTextReactivateId != g.DeactivatedItemData.ID)
|
||||
g.InputTextReactivateId = 0;
|
||||
if (g.ActiveId == 0)
|
||||
{
|
||||
g.ActiveIdUsingNavDirMask = 0x00;
|
||||
|
||||
Reference in New Issue
Block a user