@@ -2724,11 +2724,11 @@ impl Pane {
.map(|this| {
if is_active {
let focus_handle = focus_handle.clone();
- this.tooltip(move |_window, cx| {
+ this.tooltip(move |window, cx| {
Tooltip::for_action_in(
end_slot_tooltip_text,
end_slot_action,
- &focus_handle,
+ &window.focused(cx).unwrap_or_else(|| focus_handle.clone()),
cx,
)
})
@@ -3031,7 +3031,14 @@ impl Pane {
.disabled(!self.can_navigate_backward())
.tooltip({
let focus_handle = focus_handle.clone();
- move |_window, cx| Tooltip::for_action_in("Go Back", &GoBack, &focus_handle, cx)
+ move |window, cx| {
+ Tooltip::for_action_in(
+ "Go Back",
+ &GoBack,
+ &window.focused(cx).unwrap_or_else(|| focus_handle.clone()),
+ cx,
+ )
+ }
});
let navigate_forward = IconButton::new("navigate_forward", IconName::ArrowRight)
@@ -3047,8 +3054,13 @@ impl Pane {
.disabled(!self.can_navigate_forward())
.tooltip({
let focus_handle = focus_handle.clone();
- move |_window, cx| {
- Tooltip::for_action_in("Go Forward", &GoForward, &focus_handle, cx)
+ move |window, cx| {
+ Tooltip::for_action_in(
+ "Go Forward",
+ &GoForward,
+ &window.focused(cx).unwrap_or_else(|| focus_handle.clone()),
+ cx,
+ )
}
});