fix(modal): keep focus in annotations section when moving up from first

item
This commit is contained in:
Ignacio Perez
2026-01-04 18:38:04 -03:00
parent 2d694ee016
commit 540627db75
+3 -1
View File
@@ -1841,11 +1841,13 @@ impl TaskDetailModal {
pub fn scroll(&self, delta: i32, cx: &mut gpui::Context<Self>) {
let handle = &self.scroll_handle;
let current = if delta > 0 {
handle.bottom_item()
} else {
handle.top_item()
};
let next = if delta > 0 {
current.saturating_add(1)
} else {
@@ -1890,7 +1892,7 @@ impl TaskDetailModal {
(Some(next_index), true)
}
} else if i == 0 {
(None, false)
(None, true)
} else {
(Some(i - 1), true)
}