Merge pull request #95028 from kitbdev/fix-spin-slider-hidden

Fix EditorSpinSlider when hidden
This commit is contained in:
Rémi Verschelde 2024-08-16 14:32:57 +02:00
commit 6fd0076ac4
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -614,13 +614,13 @@ void EditorSpinSlider::_value_focus_exited() {
// -> TAB was pressed
// -> modal_close was not called
// -> need to close/hide manually
if (value_input_closed_frame != Engine::get_singleton()->get_frames_drawn()) {
if (!is_visible_in_tree() || value_input_closed_frame != Engine::get_singleton()->get_frames_drawn()) {
// Hidden or something else took focus.
if (value_input_popup) {
value_input_popup->hide();
}
//tab was pressed
} else {
//enter, click, esc
// Enter or Esc was pressed.
grab_focus();
}