Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

V-tooltip appears outside the screen on mobile

I'm struggling to stop vue tooltip from appearing outside the screen.

I have this simple implementation:

<span>
    class="features-tooltip"
    v-tooltip="{ content: 'Long string here' }">
</span>

tooltip

How do I make tooltip fit the window frame?

Thanks for help

like image 809
Dejmon Avatar asked Sep 01 '25 05:09

Dejmon


1 Answers

Solution to your problem is pretty simple. You just have to add one additional property boundariesElement: 'window' to your tooltip object.

So in your case it would look like this:

<span>
    class="features-tooltip"
    v-tooltip="{ content: 'Long string here', boundariesElement: 'window'}">
</span>
like image 166
Kacper Cieluch Avatar answered Sep 02 '25 18:09

Kacper Cieluch