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

fix: useViewportScrollCoords & useViewportScale fall back properly

Open DougReeder opened this issue 4 years ago • 1 comments

  1. Both hooks fall back properly when window.visualViewport isn't defined (as in jsdom when running tests, or an old browser)
  2. useViewportScale falls back to 1.0 rather than 0
  3. useViewportScrollCoords also updates on resize events resize

DougReeder avatar Oct 04 '21 06:10 DougReeder

I don't know why the Build Errored, but it builds fine and the tests pass for me, using node 14.16.1 under MacOS 11.6.

DougReeder avatar Oct 04 '21 06:10 DougReeder