6

The tooltip box dissapear disappear instantly.

<p id="tooltip_target_tags">Some text</p>
<b-tooltip target="tooltip_target_tags" placement="top" triggers="hover">
    <!-- CONTENT -->
</b-tooltip>

Tooltip bug

2
  • It's most likely a problem with your specific scenario. For example this works fine. You should create a Minimal, Reproducible Example or if you think it's a bug, submit an issue on their GitHub. Commented May 8, 2020 at 20:42
  • Thanks for your reply. Just created an example but it seem to work fine as well. I found the solution by analyzing the component's behaviour on the live page. Commented May 9, 2020 at 4:59

2 Answers 2

6

It looks like you are not including BootstrapVue's custom css as mentioned in the docs.

BootstrapVue's custom css is required to make bootstrap's css work with Vue's transition component.

import Bootstrap and BootstrapVue css files in your app entry point(mostly main.js):

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'

Alternatively you can import Bootstrap and BootstrapVue scss files in a custom SCSS file:

@import 'node_modules/bootstrap/scss/bootstrap';
@import 'node_modules/bootstrap-vue/src/index.scss';

Make sure to import the custom.scss file in your app entry point (when using sass-loader):

import './custom.scss'
Sign up to request clarification or add additional context in comments.

Comments

6

It looks like tooltip object remains on the page but instead of:

<div class="tooltip fade bs-tooltip-top show">

my tooltip object will be:

<div class="tooltip b-tooltip bs-tooltip-top fade">

the "fade" class disappearing instantly.

Because my tooltip object doesn't get the show class, which by default is:

.tooltip.show{opacity:0.9 !important;}

, my object's opacity will remain 0.

The only solution that works for me is to set the tooltip's class opacity manual.

<style>
      .tooltip{
            opacity: 1 !important;
      }
</style>

2 Comments

While this code may provide a solution to problem, it is highly recommended that you provide additional context regarding why and/or how this code answers the question. Code only answers typically become useless in the long-run because future viewers experiencing similar problems cannot understand the reasoning behind the solution.
Hi! Just edited my answer. Is that context legible?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.