react-use icon indicating copy to clipboard operation
react-use copied to clipboard

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

Open suuzhh opened this issue 1 year ago • 2 comments

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

suuzhh avatar Apr 18 '24 07:04 suuzhh

Assign me this issue

omwagh28 avatar Jul 16 '24 08:07 omwagh28

Assign me this issue

I don't have permission, waiting for the administrator to handle @omwagh28

suuzhh avatar Jul 19 '24 02:07 suuzhh