-
Notifications
You must be signed in to change notification settings - Fork 253
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
Support firing events inside of custom element shadow DOM #319
Labels
Comments
hontas
pushed a commit
to hontas/user-event
that referenced
this issue
Jun 8, 2020
hontas
pushed a commit
to hontas/user-event
that referenced
this issue
Jun 8, 2020
hontas
pushed a commit
to hontas/user-event
that referenced
this issue
Jun 8, 2020
kentcdodds
added a commit
that referenced
this issue
Jun 8, 2020
* feat: add support for custom elements Closes #319 * Update src/type.js Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> * uncomplicate setup fn * make it untouched Co-authored-by: Pontus Lundin <pontus.lundin@ica.se> Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
🎉 This issue has been resolved in version 11.3.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
hontas
pushed a commit
to hontas/user-event
that referenced
this issue
Jun 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@testing-library/user-event
version: 11.2.1@open-wc/testing
version 2.5.17lit-html
version 1.2.1mocha
version 6.2.3Relevant code or config
What you did:
I used
userEvent.type
with on an input-element inside a custom element's shadow DOM (in order to test its internal event listeners).What happened:
Events did not fire on the input.
Reproduction repository:
Problem description:
The
currentElement
-helper returnselement.ownerDocument.activeElement
which return the custom element host instead of the focused element inside its shadow DOM. I'm guessing this is intended ;) but it is causing problems in this case, and it's not how the real DOM behaves when writing in an input-element inside a custom element.Suggested solution:
Modify the
currentElement
-helper to returnactiveElement
inside shadow DOM.PR on its way :)
The text was updated successfully, but these errors were encountered: