From 60bdbb77ce880804f9bda47a48c569a4dffa1d5f Mon Sep 17 00:00:00 2001 From: Alvin Nguyen <106125101+alvinwin@users.noreply.github.com> Date: Mon, 24 Aug 2026 17:19:07 -0700 Subject: [PATCH] fix(search): preserve scroll position with context drawer AI-assisted: implementation developed with Codex 5.6 Sol Medium and independently reviewed with Claude Opus 4.6 High; final changes reviewed and understood by the author. --- cosmic-settings/src/app.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cosmic-settings/src/app.rs b/cosmic-settings/src/app.rs index 1596305..da1100f 100644 --- a/cosmic-settings/src/app.rs +++ b/cosmic-settings/src/app.rs @@ -63,6 +63,7 @@ pub struct SettingsApp { pages: page::Binder, search_active: bool, search_id: cosmic::widget::Id, + search_scroll_id: cosmic::iced::id::Id, search_input: String, search_selections: Vec<(page::Entity, section::Entity)>, context_title: Option, @@ -205,6 +206,7 @@ impl cosmic::Application for SettingsApp { pages: page::Binder::default(), search_active: false, search_id: cosmic::widget::Id::unique(), + search_scroll_id: cosmic::iced::id::Id::new("COSMIC_search_results_scrollable"), search_input: String::new(), search_selections: Vec::default(), context_title: None, @@ -1208,6 +1210,7 @@ impl SettingsApp { self.page_container(settings::view_column(sections)) .apply(scrollable) + .apply(|w| id_container(w, self.search_scroll_id.clone())) .into() }