diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 809fd954d..6e825898b 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -353,9 +353,11 @@ void PopupMenu::_gui_input(const Ref &p_event) { } // Make an area which does not include v scrollbar, so that items are not activated when dragging scrollbar. - Rect2 item_clickable_area = control->get_global_rect(); + Transform2D xform = get_global_transform_with_canvas(); + Point2 item_origin = xform.get_origin(); float scroll_width = scroll_container->get_v_scrollbar()->is_visible_in_tree() ? scroll_container->get_v_scrollbar()->get_size().width : 0; - item_clickable_area.set_size(Size2(item_clickable_area.size.width - scroll_width, item_clickable_area.size.height)); + Size2 item_size = (control->get_global_rect().get_size() - Vector2(scroll_width, 0)) * xform.get_scale(); + Rect2 item_clickable_area = Rect2(item_origin, item_size); Ref b = p_event;