-
-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove node hovered state on mouseleave event (#569)
- Loading branch information
1 parent
b5df8ce
commit e8681d2
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@craftjs/core': patch | ||
--- | ||
|
||
Remove node hovered state on mouseleave event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,8 +134,18 @@ export class DefaultEventHandlers<O = {}> extends CoreEventHandlers< | |
} | ||
); | ||
|
||
const unbindMouseleave = this.addCraftEventListener( | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
prevwong
Owner
|
||
el, | ||
'mouseleave', | ||
(e) => { | ||
e.craft.stopPropagation(); | ||
store.actions.setNodeEvent('hovered', null); | ||
} | ||
); | ||
|
||
return () => { | ||
unbindMouseover(); | ||
unbindMouseleave(); | ||
}; | ||
}, | ||
drop: (el: HTMLElement, targetId: NodeId) => { | ||
|
This patch causes blinking when the mouse is moved over the hover toolbar @giliamverheide