godotengine / godotengine/godot
Button node registers press when disabled
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
I'm only using 4.3
### System information
Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce GTX 970 (NVIDIA; 32.0.15.6094) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
### Issue description
Button is not fully inactive when disabled
You can still click a disabled button and then register a release after it's enabled again without registering a button down signal
### Steps to reproduce
Button node -> set to disabled
Press the button and hold down the mouse - NOTE: No down signal is sent (as expected), but the button still registered it's been pressed (which it shouldn't)
Keep the disabled button pressed
Wait for timer to enable the button
Release button - button up signal IS sent (even though it wasn't pressed)
Button node -> set to disabled
Hold down the mouse outside the button - NOTE: No down signal is sent (as expected)
Keep the mouse pressed
Wait for timer to enable the button
Move mouse over button
Release button - button up signal is NOT sent (as expected)
### Minimal reproduction project (MRP)
[button-bug-report.zip](https://github.com/user-attachments/files/17506970/button-bug-report.zip)
Contributor guide
Research direction
Start by running the linked button-bug-report.zip minimal reproduction project with Godot 4.3 and observe the disabled Button's press and release signals across re-enabling. Trace the Button node's input handling, then verify that releasing a mouse press after re-enabling does not emit an unmatched release signal while the reported outside-button behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100