Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegate does not support shadow dom for Firefox #765

michaelw85 opened this issue Nov 12, 2019 · 0 comments · Fixed by #766

Delegate does not support shadow dom for Firefox #765

michaelw85 opened this issue Nov 12, 2019 · 0 comments · Fixed by #766


Copy link

@michaelw85 michaelw85 commented Nov 12, 2019

I'm submitting a bug report

Related to: #755

  • Library Version:

Please tell us about your environment:

  • Operating System:
    Windows [10]

  • Node Version:

  • NPM Version:
  • Browser:
    Firefox 70.0.1 (64-bits)

  • Language:

Current behavior:
Clicking nested elements in shadow dom does not trigger click delegate.

In my case this fails for a search input with a search button.

The search button has a click.trigger which should dispatch a custom "on-search" event. This fails due to:

// event-manager.js:7
function findOriginalEventTarget(event) {
  return (event.path && event.path[0]) || (event.deepPath && event.deepPath[0]) ||;

Result in firefox:
spec-input-search (custom search component containing the search button)

Chrome (which works properly):

Reason for failure:
Firefox does not have event.path or deepPath so falls back to target which does not take shadow dom into account.

Proposed solution:
Use composedPath before using fallback to

Expected/desired behavior:
When using shadow dom, nested should handle click delegate properly

michaelw85 added a commit to michaelw85/binding that referenced this issue Nov 12, 2019
Return correct original event target for Firefox

Closes aurelia#765
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.