Pane tabs: Scroll entire new tab into view (#36827)
The state of the child bounds is not up-to-date when `scroll_to_item` gets triggered, causing the new tab to not scroll completely into view. Closes #36317 Release Notes: - Fix an issue where a new tab is only partially visible on creation.
This commit is contained in:
@@ -6514,14 +6514,8 @@ async fn test_right_click_menu_behind_collab_panel(cx: &mut TestAppContext) {
|
||||
cx.simulate_keystrokes("cmd-n cmd-n cmd-n");
|
||||
cx.update(|window, _cx| window.refresh());
|
||||
|
||||
let tab_bounds = cx.debug_bounds("TAB-2").unwrap();
|
||||
let new_tab_button_bounds = cx.debug_bounds("ICON-Plus").unwrap();
|
||||
|
||||
assert!(
|
||||
tab_bounds.intersects(&new_tab_button_bounds),
|
||||
"Tab should overlap with the new tab button, if this is failing check if there's been a redesign!"
|
||||
);
|
||||
|
||||
cx.simulate_event(MouseDownEvent {
|
||||
button: MouseButton::Right,
|
||||
position: new_tab_button_bounds.center(),
|
||||
|
||||
Reference in New Issue
Block a user