Skip to content

Commit 0576d99

Browse files
committed
fix(Event): fix handling events on phase AT_TARGET
1 parent 0edac0b commit 0576d99

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/canvas/layers/graphLayer/GraphLayer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ export class GraphLayer extends Layer<TGraphLayerProps, TGraphLayerContext> {
154154
return;
155155
}
156156

157-
if (e.eventPhase === Event.BUBBLING_PHASE && rootBubblingEventTypes.has(e.type)) {
157+
if (
158+
(e.eventPhase === Event.AT_TARGET || e.eventPhase === Event.BUBBLING_PHASE) &&
159+
rootBubblingEventTypes.has(e.type)
160+
) {
158161
switch (e.type) {
159162
case "mousedown":
160163
case "touchstart": {

0 commit comments

Comments
 (0)