mirror of
https://github.com/ocornut/imgui.git
synced 2026-07-23 17:33:01 +00:00
InputText: reworked io.ConfigInputTextEnterKeepActive mode so that pressing Ctrl+Enter or Shift+Enter still allows to deactivate.
cc #9239
This commit is contained in:
@@ -5173,7 +5173,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
if (!is_new_line)
|
||||
{
|
||||
validated = clear_active_id = true;
|
||||
if (io.ConfigInputTextEnterKeepActive && !is_multiline)
|
||||
if (io.ConfigInputTextEnterKeepActive && !is_multiline && !is_ctrl_enter && !is_shift_enter)
|
||||
{
|
||||
// Queue reactivation, so that e.g. IsItemDeactivatedAfterEdit() will work. (#9001)
|
||||
state->SelectAll(); // No need to scroll
|
||||
|
||||
Reference in New Issue
Block a user