open context menus on rmb-up event instead of rmb-down

- this is the standard behavior in other UI libs
- fixes inability to open some context menus
This commit is contained in:
Dmitry Stepanov
2025-04-23 20:39:18 +03:00
parent a90755230b
commit 10f258248b
+1 -1
View File
@@ -2081,7 +2081,7 @@ impl UserInterface {
}
}
}
WidgetMessage::MouseDown { button, .. } => {
WidgetMessage::MouseUp { button, .. } => {
if *button == MouseButton::Right && !message.handled() {
if let Some(picked) = self.nodes.try_borrow(self.picked_node) {
// Get the context menu from the current node or a parent node