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

[Feature-Request] clickElemAt + hoverElemAt #281

Closed
KearseTrevor opened this issue Dec 20, 2023 · 1 comment · Fixed by #542
Closed

[Feature-Request] clickElemAt + hoverElemAt #281

KearseTrevor opened this issue Dec 20, 2023 · 1 comment · Fixed by #542
Labels

Comments

@KearseTrevor
Copy link
Contributor

Problem Definition

  • Many components have specific behaviours depending on which portion of the element is being interacted with
  • Specifically in some cases, a child component may rest in the very center of the parent component that is being interacted with
    • This child component will now be the main target of clickElem or hoverElem and can potentially hijack the expected experience of the target element for its own

Current workarounds

  • dig through the shadowRoot of the parent to find a different child element that won't hijack the expected behaviour from parent (if one exists)
  • home brew a clickAt or hoverAt solve by using elem.getBoundingClientRect() to generate a DOMRect() for position target information

Suggestion

  • Provide new functions clickElemAt and hoverElemAt which will interact with the target element at some offset from their origin instead
  • Example branch
Copy link

🎉 This issue has been resolved in version 1.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant