Skip to content

Conversation

@J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Dec 24, 2025

Noticable shift by ~1px:

  • on docs Dialogs
  • with 150% scaling on the OS level

Also larger shift when using <v-main scrollable> (see example below)

Cause: window.innerWidth - document.documentElement.offsetWidth returns wrong value (verified on vanilla Chrome and Brave, on Linux) unless scaling is exactly 100%.

Note: scrollbar-gutter requires Safari 18.1 (we claim 16.4 is gonna be supported by v4)

<template>
  <v-app theme="dark">
    <v-main scrollable>
      <v-container>
        <v-dialog max-width="500" scroll-strategy="block">
          <template v-slot:activator="{ props: activatorProps }">
            <v-btn
              v-bind="activatorProps"
              color="surface-variant"
              text="Open Dialog"
              variant="flat"
            ></v-btn>
          </template>

          <v-card title="Dialog">
            <v-card-text>
              Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
              eiusmod tempor incididunt ut labore et dolore magna aliqua.
            </v-card-text>
          </v-card>
        </v-dialog>
      </v-container>

      <v-img
        src="https://cdn.cosmicjs.com/68b46aa0-d4fe-11ee-9ce5-59949019255e-VUETIFY-ONE-3.png"
        width="200"
        height="300"
        class="position-absolute right-0"
      />

      <v-card width="200" height="200vh" />
    </v-main>
  </v-app>
</template>

- scrollbar width was not calculated correctly when (OS-level) display scaling is not 100%
@J-Sek J-Sek requested a review from KaelWD December 24, 2025 13:11
@J-Sek J-Sek self-assigned this Dec 24, 2025
@J-Sek J-Sek added T: bug Functionality that does not work as intended/expected C: VOverlay labels Dec 24, 2025
@KaelWD
Copy link
Member

KaelWD commented Dec 25, 2025

I did actually try this first but the blank space when a scrim is up is pretty fugly.

@J-Sek
Copy link
Contributor Author

J-Sek commented Dec 25, 2025

Maybe overscroll-behavior: contain could help instead?
It would be kinda hacky... let's say scrim would have a pseudo-element making it scrollable. If we hide scrim scrollbar, user wheel events won't reach the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: VOverlay T: bug Functionality that does not work as intended/expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants