only trigger onmousemove if the position has changed

This commit is contained in:
Evan Almloff committed 2022-05-06 17:01:50 -05:00
1 parent b8c739826a
commit e3757f97ed
1 file changed
+2
+2
View File
@@ -242,6 +242,7 @@ impl InnerInputState {
{ {
// mousemove // mousemove
if old_pos != Some(new_pos) {
let mut will_bubble = FxHashSet::default(); let mut will_bubble = FxHashSet::default();
for node in dom.get_listening_sorted("mousemove") { for node in dom.get_listening_sorted("mousemove") {
let node_layout = layout.layout(node.state.layout.node.unwrap()).unwrap(); let node_layout = layout.layout(node.state.layout.node.unwrap()).unwrap();
@@ -262,6 +263,7 @@ impl InnerInputState {
} }
} }
} }
}
{ {
// mouseenter // mouseenter