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

useMedia throw "addEventListener is not a function" error occurs in browsers ios13.1 and below #2554

Open
SuZHui opened this issue Apr 18, 2024 · 0 comments

Comments

@SuZHui
Copy link

SuZHui commented Apr 18, 2024

What is the current behavior?

Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-use. Paste the link to your JSFiddle or CodeSandbox example below:

What is the expected behavior?

Using useMedia in a lower version of Safari throws an exception, prompting "addEventListener is not a function"

A little about versions:

  • user agent string: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1"
  • OS: IOS
  • Browser (vendor and version): Safari 13.1
  • React: 17.0.2
  • react-use: 17.4.3
  • Did this worked in the previous package version? : yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant