Skip to content

Commit

Permalink
Fix Node::simulate_click not centering cursor over widget
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Nov 28, 2024
1 parent 1336a50 commit 899a5e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ impl<'tree> Node<'tree> {

/// Simulate a click event at the node center
pub fn simulate_click(&self) {
self.hover();
ElementState::click().for_each(|state| {
self.event(Event::Simulated(SimulatedEvent::MouseInput {
button: MouseButton::Left,
Expand Down

0 comments on commit 899a5e0

Please sign in to comment.