mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(core): Fix shouldPreventDefaultBeforeDispatching bug (#56188)
When I copied this over in https://github.com/angular/angular/commit/caedd10597a6becfc1f1f0d98b06dc76d6b25a86 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:
committed by
Jessica Janiuk
parent
616cdef474
commit
2a440e1064
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user