You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can not make Combo accessible using keyboard. I can easily move between InputInt items using TAB keyboard and enter data there using keyboard, but TAB does not stop on Combo, also I can not select items from Combo by keyboard.
I tried ImGuiConfigFlags_NavEnableKeyboard flag, however that is not correct way as this navigates using arrow keys and a spacebar, which is not default behaviour in modern OS (i.e. move focus should be achieved using TAB).
It seems Tab stop is not working for Combo.
Screenshots/Video
Standalone, minimal, complete and verifiable example:
// Here's some code anyone can copy and paste to reproduce the issue
ImGui::Begin("Example Bug");
static int frame = 0;
if (frame < 2)
{
ImGui::SetKeyboardFocusHere();
frame++;
}
const char *items[] = { "Item 1", "Item 2", "Item 3" };
static int selectedItemNum = 0;
if (ImGui::BeginCombo("combo", items[selectedItemNum]))
{
for (int n = 0; n < IM_ARRAYSIZE(items); n++)
{
bool isSelected = (selectedItemNum == n);
if (ImGui::Selectable(items[n], isSelected))
{
selectedItemNum = n;
}
if (isSelected)
ImGui::SetItemDefaultFocus();
}
ImGui::EndCombo();
}
static int val1 = 0;
ImGui::InputInt("input 1", &val1);
static int val2 = 0;
ImGui::InputInt("input 2", &val2);
static int val3 = 0;
ImGui::InputInt("input 3", &val3);
ImGui::End();
The text was updated successfully, but these errors were encountered:
The nav system currently doesn't support that.
It is planned we will someday but it's not currently the case.
I've done some work on it for #4079 and a private branch but we are currently stuck finishing it due to a scrolling issue. I think tabbing should be reengineered to use same deferred logic as directional navigation.
I'll close this as duplicate of existing issues incl #3092#3208
Version/Branch of Dear ImGui:
Version: 1.82 (2021/XX/XX (1.XX) - when multi-viewports are enabled....)
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_opengl3.cpp + imgui_impl_sdl.cpp
Operating System: macOS/Windows/Linux
My Issue/Question:
I can not make Combo accessible using keyboard. I can easily move between InputInt items using TAB keyboard and enter data there using keyboard, but TAB does not stop on Combo, also I can not select items from Combo by keyboard.
I tried
ImGuiConfigFlags_NavEnableKeyboard
flag, however that is not correct way as this navigates using arrow keys and a spacebar, which is not default behaviour in modern OS (i.e. move focus should be achieved using TAB).It seems Tab stop is not working for Combo.
Screenshots/Video
Standalone, minimal, complete and verifiable example:
The text was updated successfully, but these errors were encountered: