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

useWindowSize could return window width minus scrollbar

Open chitinlink opened this issue 2 years ago • 1 comments

I realized useWindowSize returns the window's innerWidth which includes the scrollbar's width, if present, but also that I could use useScrollbarWidth to subtract it.

Why not add an innerWidth (and innerHeight) value to useWindowSize? It can be fetched using window.document.body.clientWidth.

chitinlink avatar May 16 '23 12:05 chitinlink

Assign me this issue

omwagh28 avatar Jul 16 '24 08:07 omwagh28