fix(core): Fix shouldPreventDefaultBeforeDispatching bug (#56188)

When I copied this over in caedd10597
the parentheses moved around the A tag check and the CLICK type check,
instead of around the CLICK and CLICKMOD check.

PR Close #56188
This commit is contained in:
Tom Wilkinson 2024-05-30 12:14:02 -05:00 committed by Jessica Janiuk
parent 616cdef474
commit 2a440e1064

View file

@ -133,8 +133,9 @@ function shouldPreventDefaultBeforeDispatching(
// a child of an anchor that has a jsaction attached. For that reason, we
// need to check the actionElement rather than the targetElement.
return (
(actionElement.tagName === 'A' && eventInfoWrapper.getEventType() === EventType.CLICK) ||
eventInfoWrapper.getEventType() === EventType.CLICKMOD
actionElement.tagName === 'A' &&
(eventInfoWrapper.getEventType() === EventType.CLICK ||
eventInfoWrapper.getEventType() === EventType.CLICKMOD)
);
}