diff --git a/crates/ui-egui/src/tools/forms_ui/editor.rs b/crates/ui-egui/src/tools/forms_ui/editor.rs index d4a8124020..c03d337cad 100644 --- a/crates/ui-egui/src/tools/forms_ui/editor.rs +++ b/crates/ui-egui/src/tools/forms_ui/editor.rs @@ -389,7 +389,7 @@ pub(crate) fn show( .mode(if multiline { EditorMode::FieldLines } else { EditorMode::FieldLine }) .esc_commits(false); let editor = if f.has(field_flags::PASSWORD) { editor.masked() } else { editor }; - let out = editor.show_at(ui, rect); + let out = ui.push_id((&f.name, f.obj, widget), |ui| editor.show_at(ui, rect)).inner; ended = out.ended; shown = Some(out.response.id); } diff --git a/crates/ui-egui/tests/it/view.rs b/crates/ui-egui/tests/it/view.rs index e2c39d00ac..0c03daf7bf 100644 --- a/crates/ui-egui/tests/it/view.rs +++ b/crates/ui-egui/tests/it/view.rs @@ -1024,6 +1024,9 @@ fn bookmark_destinations_scroll_to_their_position() { use egui_kittest::kittest::Queryable; use pdfcraft_ui_egui::canvas::Fit; let mut h = dests_harness(); + // Leave enough room to scroll the destination to the start edge at 300%. + h.set_size(egui::vec2(1300.0, 900.0)); + h.run_steps(6); // Fit width: the pages are taller than the window, so any point of them can reach its top. h.get_by_label("Section 1.1 Shapes").click(); h.run_steps(6);