diff --git a/crates/ui-egui/src/panels/doc_info.rs b/crates/ui-egui/src/panels/doc_info.rs index e6f7cb6e86..5cb45f666a 100644 --- a/crates/ui-egui/src/panels/doc_info.rs +++ b/crates/ui-egui/src/panels/doc_info.rs @@ -59,6 +59,12 @@ pub(crate) fn copy_value(ui: &mut Ui, label: &str, value: &str, mono: bool) -> b /// The same guarded full-value copy for an already shown readout. An elided path remains /// static text: selection indices must describe the text actually shown by the framework. pub(crate) fn copy_shown(ui: &mut Ui, shown: &egui::Response, value: &str) -> bool { + // A container's measuring run shows the readout in an invisible sizing pass before the frame's real run, with the + // same id and the same input. It neither copies nor reads or clears the remembered press: clearing it there would + // leave the real run's release without its press. + if ui.is_sizing_pass() { + return false; + } // The click's own position and keys: a move or a key change after the release in the same // frame leaves the pointer and the held keys elsewhere. A frame with more than one release // copies nothing, since the click flags below do not say which release they describe.