Forms: lists reveal their cursor once laid out
- Select, Combobox and MultiSelect opened a long list at its top, the choice out of view: gpui skips a scroll asked before the list's first frame. Picker and Suggestions share forms::options::reveal, which Popup runs from a canvas inside the list - test: a_long_list_opens_with_its_choice_in_view - AGENTS: the scroll rule names the reveal
This commit is contained in:
1 parent
7f4bd8415c
commit
247f836073
7 files changed
+129
-28
No files matched your search
+2
-1
@@ -92,6 +92,7 @@ impl RenderOnce for MultiSelect {
|
||||
picker.scroll.clone(),
|
||||
)
|
||||
};
|
||||
let reveal = Picker::reveal(&picker, open, highlighted, cx);
|
||||
let commit: OnValues = {
|
||||
let (id, on_change) = (self.id.clone(), self.on_change);
|
||||
Rc::new(move |next, window, cx| {
|
||||
@@ -222,7 +223,7 @@ impl RenderOnce for MultiSelect {
|
||||
Picker::show(&close, false, at, cx)
|
||||
})),
|
||||
scroll: Some(&scroll),
|
||||
reveal: None,
|
||||
reveal,
|
||||
}
|
||||
.render(window, cx),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user