This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Bubbling browserTrigger() event #5178
Closed
Description
I'm trying to use browserTrigger()
on an element and need the event on to bubble up to its ancestors, but the handler from the element (ancestor) isn't firing
This is a simple example of what I'm trying to do:
<div ng-click="catchMe()">
<span>ClickMe</span>
</div>
var child = $document.find('span');
browserTrigger(child,'click');
The catchMe()
event (div's click handler) isn't getting fired.
I checked the code from browserTrigger and the event that is pass to element.dispatchEvent(env)
is with canBubble : true
, so I don't get why it isn't bubbling...