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
Hello and thank you for the great library! I have encountered what I believe to be a bug where if a button is disabled while it holds keyboard focus, you can continue to action the button while it is in its disabled state by pressing "space".
Steps to Reproduce Using Below Example:
Navigate to the button using "tab" so that it holds focus.
Use "space" to action the button causing it to become disabled.
Use "space" to action the disabled button.
Expectation: Button should not be able to be clicked while disabled.
Reality: Button can still be clicked with keyboard inputs.
Screenshots/Video:
Screencast.from.2025-10-26.08-48-38.webm
Minimal, Complete and Verifiable Example code:
The following code snippet is a modification of the example_glfw_opengl3/main.cpp file. I have included a small amount of context to illustrate where in the file it is inserted.
// 1. Show the big demo window (Most of the sample code is in// ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear// ImGui!).if (show_demo_window)
ImGui::ShowDemoWindow(&show_demo_window);
// ========= BEGIN REPRODUCTION ========= //
{
staticbool disabled = false;
ImGui::Begin("Bug Report Window");
ImGui::BeginDisabled(disabled);
if (ImGui::Button("Click me with the keyboard")) {
if (disabled) {
printf("Button was clicked while disabled!!!\n");
}
disabled = !disabled;
}
ImGui::EndDisabled();
ImGui::End();
}
// ========= END REPRODUCTION ========= //// 2. Show a simple window that we create ourselves. We use a Begin/End pair// to create a named window.
{
Version/Branch of Dear ImGui:
Version 1.92.2b, Branch: docking, Tag: v1.92.2b-docking
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Linux + g++ 13.3.0
Full config/build information:
Details:
My Issue/Question:
Hello and thank you for the great library! I have encountered what I believe to be a bug where if a button is disabled while it holds keyboard focus, you can continue to action the button while it is in its disabled state by pressing "space".
Steps to Reproduce Using Below Example:
Screenshots/Video:
Screencast.from.2025-10-26.08-48-38.webm
Minimal, Complete and Verifiable Example code:
The following code snippet is a modification of the
example_glfw_opengl3/main.cppfile. I have included a small amount of context to illustrate where in the file it is inserted.