Skip to content

Commit 68f665c

Browse files
committed
Revert "[FIX] Fix ElementComponent 'mousemove' event firing outside element (…" (#8413)
This reverts commit 33e0e63.
1 parent c026827 commit 68f665c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/framework/input/element-input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,8 @@ class ElementInput {
733733
// currently hovered element is whatever's being pointed by mouse (which may be null)
734734
this._hoveredElement = element;
735735

736-
// if there was a pressed element, it takes full priority of 'up' events for click detection
737-
if (eventType === 'mouseup' && this._pressedElement) {
736+
// if there was a pressed element, it takes full priority of 'move' and 'up' events
737+
if ((eventType === 'mousemove' || eventType === 'mouseup') && this._pressedElement) {
738738
this._fireEvent(eventType, new ElementMouseEvent(event, this._pressedElement, camera, targetX, targetY, this._lastX, this._lastY));
739739
} else if (element) {
740740
// otherwise, fire it to the currently hovered event

0 commit comments

Comments
 (0)