Merge pull request #95432 from bruvzg/rest_pop_time_on_click

Stop popup release timeout on click.
This commit is contained in:
Rémi Verschelde 2024-08-12 22:22:42 +02:00
commit b2f8ed7ff7
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -589,6 +589,7 @@ void PopupMenu::_input_from_window_internal(const Ref<InputEvent> &p_event) {
// This allows for opening the popup and triggering an action in a single mouse click.
if (button_idx == MouseButton::LEFT || initial_button_mask.has_flag(mouse_button_to_mask(button_idx))) {
if (b->is_pressed()) {
during_grabbed_click = false;
is_scrolling = is_layout_rtl() ? b->get_position().x < item_clickable_area.position.x : b->get_position().x > item_clickable_area.size.width;
if (!item_clickable_area.has_point(b->get_position())) {