Merge pull request #53830 from zaevi/fix_EditorSpinSlider_freeze

This commit is contained in:
Rémi Verschelde 2021-10-15 12:41:47 +02:00 committed by GitHub
commit 3ca8003199
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -528,9 +528,9 @@ void EditorSpinSlider::_focus_entered() {
value_input->set_text(get_text_value());
value_input->set_position(gr.position);
value_input->set_size(gr.size);
value_input->call_deferred("show_modal");
value_input->call_deferred("grab_focus");
value_input->call_deferred("select_all");
value_input->show_modal();
value_input->select_all();
value_input->call_deferred("grab_focus"); // deferred to avoid losing focus
value_input->set_focus_next(find_next_valid_focus()->get_path());
value_input->set_focus_previous(find_prev_valid_focus()->get_path());
}