`group` widgets ignore horizontal wrapping
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Describe the bug**
When using `ui.group()` inside something like `ui.horizontal_wrapped()`, the widgets seem to ignore wrapping and just keep going well past screen boundaries. I went crazy trying to figure out why my UI was overflowing, until I removed the group and it started wrapping as expected.
**To Reproduce**
I put together this simple sample with eframe that triggers the issue:
```rust
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use eframe::egui;
#[derive(Default)]
struct DummyApp;
impl eframe::App for DummyApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show(ctx, | ui | {
ui.horizontal_wrapped(| ui | {
for n in 0..500 {
ui.group(| ui | {
ui.strong(format!("Number {n}"));
});
}
});
});
}
}
fn main() {
let app = DummyApp::default();
let native_options = eframe::NativeOptions::default();
eframe::run_native("wrap_test", native_options, Box::new(|_| Box::new(app)));
}
```
**Expected behavior**
The widgets don't overflow, and they keep going on a new row.
Screenshots
- UI goes off-screen.

---
- Wraps as expected without the group

**Desktop (please complete the following information):**
- OS: Windows
- Version: 10
Let me know if anything else is needed here :)
Contributor guide
Research direction
Start by running the minimal eframe example from the issue and compare ui.group() with the same widgets directly inside ui.horizontal_wrapped(). Trace how these two entry points determine available width and wrapping; done means grouped widgets stay within the panel and continue on new rows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100