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

usePress throws e.target.contains undefined on ios devices #7747

Open
villAsh opened this issue Feb 8, 2025 · 2 comments
Open

usePress throws e.target.contains undefined on ios devices #7747

villAsh opened this issue Feb 8, 2025 · 2 comments
Labels
waiting Waiting on Issue Author

Comments

@villAsh
Copy link

villAsh commented Feb 8, 2025

Provide a general summary of the issue here

I am using heroui and in which they are using usePress hook.

  • The components which are using usePress are throwing e.target.contains undefined.
  • solution is to use optional chaining.
  • attaching screenshot for your reference.
  • I would like to work on this issue.
Image

🤔 Expected Behavior?

It should not throw e.target.contains undefined error

😯 Current Behavior

It is throwing e.target.undefined error

💁 Possible Solution

use optional chaining

🔦 Context

No response

🖥️ Steps to Reproduce

using any component that is using usePress

Version

3.23

What browsers are you seeing the problem on?

Chrome

If other, please specify.

nope

What operating system are you using?

macos

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@snowystinger
Copy link
Member

snowystinger commented Feb 8, 2025

Can you provide the code you're using which is resulting in this error?
I don't see it when interacting with our example on the docs website https://react-spectrum.adobe.com/react-aria/index.html on my iPhone

@villAsh
Copy link
Author

villAsh commented Feb 23, 2025

maybe it is passing undefined in the code I am using,
I'll check and let you know

@snowystinger snowystinger added the waiting Waiting on Issue Author label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting on Issue Author
Projects
None yet
Development

No branches or pull requests

2 participants