godotengine / godotengine/godot

Can't drag node to Inspector panel export var field if there is an error in code.

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

Description

### Tested versions

Reproducible in 4.3 Stable

### System information

Godot v4.3.stable - Linux Mint 21.3 (Virginia) - X11 - GLES3 (Compatibility) - Mesa Intel(R) Graphics (RPL-U) - 13th Gen Intel(R) Core(TM) i7-1355U (12 Threads)

### Issue description

After clicking "run" if there is an error in code, dragging & dropping nodes into the Inspector panel fails.

Current results:
When dragging the node to the export var field, the focus in the Inspector panel is immediately set to the selected node.

Expected results:
When dragging the node to the export var field, the focus in the Inspector panel remains on the previously selected node. (which is standard behavior)

Screen recording of this behavior.

https://github.com/user-attachments/assets/c7a9eb23-4423-471d-84af-483a0328f5ef

### Steps to reproduce

1. Create node 1.
2. Add a script to the node.
3. Add @export var to the script with type node.
4. In _ready() add a simple property change on the var.
5. Create node 2.
6. Select node 1.
7. Drag node 2 into export var field in Inspector window.8.
8. Run (F5) (this verifies your code works)
9. Remove the script from node 1
10. Add the script back to node 1
11. Run (F5) - you will get an error, because the export var is empty.
12. Select node 1
13. Attempt to drag node 2 into the Inspector. (it will fail, due to change of focus in the Inspector field)

### Minimal reproduction project (MRP)

[test-export-var-error.zip](https://github.com/user-attachments/files/18661702/test-export-var-error.zip)

Contributor guide

Open the contributing guide

Research direction

Open the attached minimal reproduction project and follow the listed steps, including running F5 with the empty export variable to trigger the error. Compare the Inspector focus while dragging node 2 into the export var field with the expected behavior, then trace the Godot Inspector/editor entry point and add a regression test showing that focus remains on node 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot
Domain
game-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.