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
{{ message }}
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.
@frlinw - Today at 5:27 AM @DominikSerafin I guess you have something like this in your code contentWidth = contentWrapperWidth + scrollbarWidth. But it should be contentWidth = contentWrapperWidth + (scrollbarWidth/window.devicePixelRatio). Browser zoom change the devicePixelRatio so the scrollbar width changes too, that's why the native scrollbar became visible if you zoom-out(edited)
The text was updated successfully, but these errors were encountered:
DominikSerafin
changed the title
Different level of Zoom/Pixel Ratio make native scrollbar visible
Different level of Zoom (and Pixel Ratio?) make native scrollbar visible
Jan 21, 2018
In addition, when you get the scrollbarWidth, you want the original scrollbarWidth (when devicePixelRatio = 1) so you have to add barWidth = Math.round(barWidth * window.devicePixelRatio) after https://github.com/DominikSerafin/vuebar/blob/master/vuebar.js#L854
then, on element resize, as I said, you can do something like contentWidth = contentWrapperWidth + (baseWidth/window.devicePixelRatio)
Vuebar is updated after any component update. So any state/DOM update dispatched in Vue component where the Vuebar is used will be detected and updates applied immediately and in $nextTick. So this covers v-for changes.
(See: https://github.com/DominikSerafin/vuebar/blob/master/vuebar.js#L671)
Originally spotted by @frlinw on https://chat.vuejs.org #i-made-this channel
The text was updated successfully, but these errors were encountered: