fix: request redraw in selectable text and context menu

This commit is contained in:
Hojjat 2026-08-07 13:45:34 -06:00 • committed by Michael Murphy
parent 8a017a15ee
commit 030a7dbe02
3 changed files with 5 additions and 1 deletions

View file

@ -377,6 +377,7 @@ impl<'a, Message: Clone + 'static> Widget<Message, crate::Theme, Renderer> for S
crate::widget::text_context_menu::TextCtxAction::Copy => {}
crate::widget::text_context_menu::TextCtxAction::SelectAll => {
self.inner.select_all(&mut tree.children[0]);
shell.request_redraw();
}
_ => {}
}

View file

@ -404,6 +404,7 @@ where
state.open = false;
});
self.widget.set_context_menu_position(self.tree, None);
shell.request_redraw();
}
return;
}
@ -450,6 +451,8 @@ where
}
}
self.widget.set_context_menu_position(self.tree, None);
// The menu closes and the selection may have changed.
shell.request_redraw();
}
let is_open = self.menu.tree.inner.with_data(|state| state.open);