Browse Source

InputText: fixed an issue with not declaring ownership of Delete/Backspace/Arrow keys. (#8048)

pull/7650/merge
ocornut 4 weeks ago
parent
commit
661bba09ce
  1. 4
      docs/CHANGELOG.txt
  2. 2
      docs/README.md
  3. 8
      imgui_widgets.cpp

4
docs/CHANGELOG.txt

@ -61,10 +61,12 @@ Other changes:
ImGui_ImplXXXX_RenderDrawData() of standard backend to expose selected render
state to draw callbacks. (#6969, #5834, #7468, #3590)
- Tables: fixed initial auto-sizing issue with synched-instances. (#8045, #7218)
- InputText: fixed an issue with not declaring ownership of Delete/Backspace/Arrow keys,
preventing use of external shortcuts not guarded by an ActiveId check. (#8048) [@geertbleyen]
- Backends: DX11, DX12, Vulkan, WGPU: expose selected state in ImGui_ImplXXXX_RenderState.
structure during render loop. (#6969, #5834, #7468, #3590)
- Backends: DX9, DX10, DX11, DX12, OpenGL, Vulkan, WGPU: Changed default texture sampler
to Clamp instead of Repeat/Wrap. (#7468, #7511, #5999, #5502)
to Clamp instead of Repeat/Wrap. (#7468, #7511, #5999, #5502, #7230)
-----------------------------------------------------------------------

2
docs/README.md

@ -196,7 +196,7 @@ Ongoing Dear ImGui development is and has been financially supported by users an
**THANK YOU to all past and present supporters for helping to keep this project alive and thriving!**
Dear ImGui is using software and services provided free of charge for open source projects:
- [PVS-Studio](https://www.viva64.com/en/b/0570/) for static analysis.
- [PVS-Studio](https://pvs-studio.com/en/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) for static analysis (supports C/C++/C#/Java).
- [GitHub actions](https://github.com/features/actions) for continuous integration systems.
- [OpenCppCoverage](https://github.com/OpenCppCoverage/OpenCppCoverage) for code coverage analysis.

8
imgui_widgets.cpp

@ -4569,10 +4569,18 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
if (user_clicked)
SetKeyOwner(ImGuiKey_MouseLeft, id);
g.ActiveIdUsingNavDirMask |= (1 << ImGuiDir_Left) | (1 << ImGuiDir_Right);
SetKeyOwner(ImGuiKey_LeftArrow, id);
SetKeyOwner(ImGuiKey_RightArrow, id);
if (is_multiline || (flags & ImGuiInputTextFlags_CallbackHistory))
{
g.ActiveIdUsingNavDirMask |= (1 << ImGuiDir_Up) | (1 << ImGuiDir_Down);
SetKeyOwner(ImGuiKey_UpArrow, id);
SetKeyOwner(ImGuiKey_DownArrow, id);
}
SetKeyOwner(ImGuiKey_Enter, id);
SetKeyOwner(ImGuiKey_KeypadEnter, id);
SetKeyOwner(ImGuiKey_Delete, id);
SetKeyOwner(ImGuiKey_Backspace, id);
SetKeyOwner(ImGuiKey_Home, id);
SetKeyOwner(ImGuiKey_End, id);
if (is_multiline)

Loading…
Cancel
Save