@@ -2996,6 +2996,7 @@ void EditorInspector::update_tree() {
29962996 int current_focusable = -1 ;
29972997
29982998 // Temporarily disable focus following on the root inspector to avoid jumping while the inspector is updating.
2999+ bool was_following = get_root_inspector ()->is_following_focus ();
29993000 get_root_inspector ()->set_follow_focus (false );
30003001
30013002 if (property_focusable != -1 ) {
@@ -3024,7 +3025,7 @@ void EditorInspector::update_tree() {
30243025 _clear (!object);
30253026
30263027 if (!object) {
3027- get_root_inspector ()->set_follow_focus (true );
3028+ get_root_inspector ()->set_follow_focus (was_following );
30283029 return ;
30293030 }
30303031
@@ -3890,7 +3891,7 @@ void EditorInspector::update_tree() {
38903891 EditorNode::get_singleton ()->hide_unused_editors ();
38913892 }
38923893
3893- get_root_inspector ()->set_follow_focus (true );
3894+ get_root_inspector ()->set_follow_focus (was_following );
38943895}
38953896
38963897void EditorInspector::update_property (const String &p_prop) {
@@ -4742,6 +4743,15 @@ void EditorInspector::_notification(int p_what) {
47424743 update_tree ();
47434744 }
47444745 } break ;
4746+
4747+ case NOTIFICATION_FOCUS_ENTER: {
4748+ set_follow_focus (true );
4749+ } break ;
4750+
4751+ case NOTIFICATION_FOCUS_EXIT: {
4752+ // Don't follow focus when the inspector is not focused. Prevents potential jumping when gaining focus.
4753+ set_follow_focus (false );
4754+ } break ;
47454755 }
47464756}
47474757
@@ -4898,7 +4908,6 @@ EditorInspector::EditorInspector() {
48984908 base_vbox->add_child (main_vbox);
48994909
49004910 set_horizontal_scroll_mode (SCROLL_MODE_DISABLED);
4901- set_follow_focus (true );
49024911
49034912 changing = 0 ;
49044913 search_box = nullptr ;
0 commit comments