Skip to content

Commit

Permalink
fix(event-manager): Firefox shadow dom event handling
Browse files Browse the repository at this point in the history
Return correct original event target for Firefox

Closes #765
  • Loading branch information
michaelw85 committed Nov 12, 2019
1 parent a29c81e commit 7a6cc3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as LogManager from 'aurelia-logging';
let emLogger = LogManager.getLogger('event-manager');
//Note: path and deepPath are designed to handle v0 and v1 shadow dom specs respectively
function findOriginalEventTarget(event) {
return (event.path && event.path[0]) || (event.deepPath && event.deepPath[0]) || event.target;
return (event.path && event.path[0]) || (event.deepPath && event.deepPath[0]) || (event.composedPath && event.composedPath()[0]) || event.target;
}

function stopPropagation() {
Expand Down

0 comments on commit 7a6cc3b

Please sign in to comment.