This repository has been archived by the owner on Jul 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Update .vb-content width on window resize (also zoom) #83
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…in progress on differently implemented scrollbar state
This reverts commit d633d1c.
This reverts commit fd70a52.
Right now even if the scroll bar is not present, it is preventing scrolling. This shouldn’t happen when no scroll bar is present.
declare state before using it.
Don't prevent parent scroll when vuebar is not shown
Change to getNativeScrollbarWidth (fixes issue DominikSerafin#42)
Allows overriding the directive name, defaulting to `bar`. E.g. ```js import Vuebar from 'vuebar'; Vue.use(Vuebar, { directive:'custom-scroll' }); ``` ```html <div v-custom-scroll></div>` ```
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When page is zoomed out, the width set to
.vb-content
(typicallycalc(100% + 17px)
) gets out of sync as the native scrollbar is still 17 (physical) pixels, but the CSS width is not. I copied bits and pieces from theinitScrollbar()
function (including those after//do the magic
comment) into a separate function that is now called fromresize
event handler.One problem still persists: When page is zoomed out, for a split second 1px of the native scrollbar shows through until the width is set and content repainted. I noticed this in Firefox, in Chrome it is all fluid.