mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
InputTextMultiline: Tabbing through a multi-line text editor using ImGuiInputTextFlags_AllowTabInput doesn't activate it. (#3092, #5759, #787)
This commit is contained in:
parent
54c1bdeceb
commit
6cfe3ddf52
5 changed files with 11 additions and 2 deletions
|
|
@ -4126,7 +4126,11 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|||
item_data_backup = g.LastItemData;
|
||||
window->DC.CursorPos = backup_pos;
|
||||
|
||||
// Prevent NavActivate reactivating in BeginChild().
|
||||
// Prevent NavActivation from Tabbing when our widget accepts Tab inputs: this allows cycling through widgets without stopping.
|
||||
if (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_FromTabbing) && (flags & ImGuiInputTextFlags_AllowTabInput))
|
||||
g.NavActivateId = 0;
|
||||
|
||||
// Prevent NavActivate reactivating in BeginChild() when we are already active.
|
||||
const ImGuiID backup_activate_id = g.NavActivateId;
|
||||
if (g.ActiveId == id) // Prevent reactivation
|
||||
g.NavActivateId = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue