godotengine / godotengine/godot

The revert button in inspector and settings items triggers when the mouse button is pressed down instead of released

Open
#112,561 0 comments 0 reactions 0 assignees View on GitHub
topic:editor usability
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.6-dev3
- Reproducible in 4.4

### System information

Ubuntu 24.04.2 LTS

### Issue description

In the inspector dock and settings dialogs, each row has a "revert" button that shows up when the value is different than the default setting. Clicking this button reverts the setting to the default value.

Image

What seems surprising is that the button triggers as soon as the mouse button is pressed down i.e. the "mousedown" event. It should trigger when the click is released only, like regular buttons i.e. the "mouseup". This is expected for buttons that have one discrete action like this one.

This action is destructive - you can lose a custom value with no "cancel" action to get it back. The standard trigger-on-release approach of mouse-operated buttons gives a chance to cancel by dragging away from the button while pressed before releasing.

### Steps to reproduce

Start a new project. Create a scene, and change a setting in the inspector. The revert button should appear.

Click on the revert button with the mouse button specifically and hold it down. If using the laptop trackpad, *do not tap it to click*; use the physical buttons if present or connect a USB mouse.

Notice that the setting is already reverted, as you are still holding the mouse button down.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue from the inspector dock and settings dialogs by holding the mouse button on a visible revert button. Trace the revert button's mouse-input handling and verify that the setting changes only after release, while dragging away cancels the action.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.