diff --git a/crates/bevy_ui/src/update.rs b/crates/bevy_ui/src/update.rs index f8699fb7fc..313b4af192 100644 --- a/crates/bevy_ui/src/update.rs +++ b/crates/bevy_ui/src/update.rs @@ -112,8 +112,8 @@ fn update_clipping( clip_rect.min.x += clip_inset.left; clip_rect.min.y += clip_inset.top; - clip_rect.max.x -= clip_inset.right; - clip_rect.max.y -= clip_inset.bottom; + clip_rect.max.x -= clip_inset.right + computed_node.scrollbar_size.x; + clip_rect.max.y -= clip_inset.bottom + computed_node.scrollbar_size.y; clip_rect = clip_rect .inflate(node.overflow_clip_margin.margin.max(0.) / computed_node.inverse_scale_factor);