Skip to content

Conversation

@J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Oct 22, 2025

fixes #22055

Note: keeping viewportMargin: 0, as some people may already use stick-to-target to get it. It should have its own prop - could be introduced in v3.11.0.

<template>
  <v-app theme="dark">
    <v-container style="height: 200vh" fluid>
      <v-btn class="top-0 left-0" position="absolute">
        Hover Over Me
        <v-tooltip
          activator="parent"
          location="bottom center"
          text="Tooltip very long text which will overflow and be outside the window"
          model-value
          stick-to-target
        />
      </v-btn>
      <v-btn class="top-0 right-0" position="absolute">
        Hover Over Me
        <v-tooltip
          activator="parent"
          location="bottom center"
          text="Tooltip very long text which will overflow and be outside the window"
          model-value
          stick-to-target
        />
      </v-btn>
      <v-btn class="bottom-0 left-0" position="absolute">
        Hover Over Me
        <v-tooltip
          activator="parent"
          location="bottom center"
          text="Tooltip very long text which will overflow and be outside the window"
          model-value
          stick-to-target
        />
      </v-btn>
      <v-btn class="bottom-0 right-0" position="absolute">
        Hover Over Me
        <v-tooltip
          activator="parent"
          location="bottom center"
          text="Tooltip very long text which will overflow and be outside the window"
          model-value
          stick-to-target
        />
      </v-btn>

      <v-sheet class="mx-auto mt-n12 pa-4 bg-purple" elevation="4" width="100">
        Hover Over Me
        <v-tooltip
          activator="parent"
          location="right bottom"
          text="Tooltip very long text which will overflow and be outside the window"
          width="150"
          model-value
          stick-to-target
        />
      </v-sheet>

      <v-sheet class="mx-auto pa-4 bg-teal-darken-2" elevation="4" style="margin-top: calc(100vh - 100px)" width="100">
        Hover Over Me
        <v-tooltip
          activator="parent"
          location="right center"
          text="Tooltip very long text which will overflow and be outside the window"
          width="150"
          model-value
          stick-to-target
        />
      </v-sheet>
    </v-container>
  </v-app>
</template>

@J-Sek J-Sek self-assigned this Oct 22, 2025
@J-Sek J-Sek added C: VMenu C: VTooltip C: VOverlay T: bug Functionality that does not work as intended/expected labels Oct 22, 2025
@J-Sek J-Sek merged commit 0e1dff0 into master Oct 24, 2025
19 checks passed
@J-Sek J-Sek deleted the fix/stick-to-target branch October 24, 2025 12:01
J-Sek added a commit that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][3.10.0] Tooltip with location top or bottom overflow window

2 participants