From 9359332fd7e61076f33c10a1ae97a0cfcf3a0177 Mon Sep 17 00:00:00 2001 From: aiongg Date: Mon, 19 Oct 2026 13:30:02 +0000 Subject: [PATCH] panes: the API example gives the document focus on to_document --- docs/ui-panes.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/ui-panes.md b/docs/ui-panes.md index fd3d9a911..43d6f5b5c 100644 --- a/docs/ui-panes.md +++ b/docs/ui-panes.md @@ -42,7 +42,13 @@ for request in out.requests { PaneRequest::Focus(_) => {} } } -egui::CentralPanel::default().show(ui, |ui| document(ui)); +egui::CentralPanel::default().show(ui, |ui| { + let response = document(ui); + if out.to_document { + // F6 or Shift+F6 left the panes: the document takes keyboard focus. + response.request_focus(); + } +}); ``` | Piece | Behaviour |