You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A layout drawn inside another's draw closure removes the outer drawing shell; the outer layout's next owned button panics #278
Placed::draw enters shell::Drawing, which stores the layout's Handle under one key per viewport. Its Dropremoves the key instead of restoring what was there. When a draw closure of layout A draws layout B (an egui Popup or Area with eggshell content), B's guard removes the key as B finishes. A's next owned button then calls nav::take_activation, which calls ui.shell(), and panics (Ui::shell is for the draw closures of a Placed).
Decided (user, 2026-11-16), all three parts of the reporter's patch:
Drawing restores the handle it displaced on drop, so guards nest like a stack.
A public ShellExt::try_shell() -> Option<Shell>. The library's Ui-only callers (keyboard activation, tooltip registration, multiline focus) use a crate-private shell_or_warn, which skips just that step outside every Placed::draw and warns once per context and step, in all builds. shell() still panics outside every draw (a programming error).
Docs: layouts may nest.
Tests: the reproduction, the outer closures seeing their shell again after the inner layout, and no shell in plain egui.
Activity