You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using useFullScreen to display a div in fullscreen. When enabled: true is passed to useFullScreen, it displays the element in fullscreen but the width, height, and position values that are returned by getBoundingClientRect on rerender are of the previous render, i.e., when div was not in fullscreen
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:
I expect that when div is switched to fullscreen, the values returned by getBoundingClientRect should be of full screen dimensions and expect the opposite behavior when disabling fullscreen.
Maybe the behavior I am expecting won't be possible due to the usage of useLayoutEffect in the implementation of useFullScreen
A little about versions:
OS: macos 14.5
Browser (vendor and version): 130.0.6723.117
React: "^18.0.0"
react-use: "^17.3.1"
Did this worked in the previous package version? - No
The text was updated successfully, but these errors were encountered:
What is the current behavior?
I am using useFullScreen to display a div in fullscreen. When enabled: true is passed to useFullScreen, it displays the element in fullscreen but the width, height, and position values that are returned by getBoundingClientRect on rerender are of the previous render, i.e., when div was not in fullscreen
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:codesandbox link -> https://mg6gc6.csb.app/
What is the expected behavior?
I expect that when div is switched to fullscreen, the values returned by getBoundingClientRect should be of full screen dimensions and expect the opposite behavior when disabling fullscreen.
Maybe the behavior I am expecting won't be possible due to the usage of useLayoutEffect in the implementation of useFullScreen
A little about versions:
react-use
: "^17.3.1"The text was updated successfully, but these errors were encountered: