device icon indicating copy to clipboard operation
device copied to clipboard

How does refreshOnResize work?

Open IamRaduB opened this issue 4 years ago • 5 comments

Perhaps I misunderstood what refreshOnResize does, but it seems that it just populates the flags again, only taking into account the user agent. The user agent does not change when you resize the browser window or rotate the mobile device, so I dont understand what its purpose is.

IamRaduB avatar Sep 30 '21 08:09 IamRaduB

Oh, I have the same question. If I open devtools, everything breaks at once.

sioniks avatar Sep 30 '21 10:09 sioniks

same, my v-if / v-else doesn't work with refreshOnResize option

n4ks avatar Oct 01 '21 10:10 n4ks

The option is the solution for a problem mentioned in the following issue. https://github.com/nuxt-community/device-module/issues/60#issuecomment-785826433

dotneet avatar Oct 01 '21 12:10 dotneet

The option is the solution for a problem mentioned in the following issue. #60 (comment)

hi, i saw this problem and read the comments. But the Resize option still doesn't work((

sioniks avatar Oct 05 '21 10:10 sioniks

The option is the solution for a problem mentioned in the following issue. #60 (comment)

hi, i saw this problem and read the comments. But the Resize option still doesn't work((

You can use the device-type plugin for SSR checks. To check the resize in the browser, you can use the resize event listener + window.innerWidth and additionally check the device type via $device if required.

n4ks avatar Oct 05 '21 18:10 n4ks