Skip to content

Commit

Permalink
Revert "fix: mouseenter wasn't being emitted when mouseover was emitt…
Browse files Browse the repository at this point in the history
…ed at the same time (#351)" (#358)

This reverts commit b5fb10f.
  • Loading branch information
marc2332 authored Oct 23, 2023
1 parent 40d5fc9 commit 44079af
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/core/src/events_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ impl EventsProcessor {
// All these events will mark the node as being hovered
// "mouseover" "mouseenter" "pointerover" "pointerenter"

// We clone this here so events emitted in the same batch that mark an element as hovered will not affect the other events
let hovered_elements = self.hovered_elements.clone();

// Emit valid events
for event in &events_to_emit {
let id = &event.node_id;
Expand All @@ -91,7 +88,7 @@ impl EventsProcessor {
| name @ "mouseenter"
| name @ "pointerover"
| name @ "pointerenter" => {
let is_hovered = hovered_elements.contains(id);
let is_hovered = self.hovered_elements.contains(id);

if !is_hovered {
self.hovered_elements.insert(*id);
Expand Down

0 comments on commit 44079af

Please sign in to comment.