question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with popovers in tabs

See original GitHub issue

I’m having issues when using popovers in tabs. Here is some code from the examples:

            <b-tabs>
                <b-tab title="first" active>
                    <b-popover placement="left">
                        <b-button variant="primary">Using slots</b-button>
                        <span slot="content">
                            Embedding content <span
                            style="color: red">using slots</span> affords you <em>greater <strong>control.</strong></em>
                        </span>
                    </b-popover>
                </b-tab>
                <b-tab title="second" >
                    <b-popover content="Embedding content using properties is easier as well as simpler to make dynamic.">
                        <b-button variant="primary">Using properties</b-button>
                    </b-popover>
                </b-tab>
                <b-tab title="disabled" disabled>
                    <b-card>I'm the card in tab</b-card>
                </b-tab>
            </b-tabs>

… and some steps for reproducing the problems I’ve noticed:

  1. Load the page( First tab should be opened with button ‘Using slots’)
  2. Go to Second tab
  3. Click the Using properties button -> It is changed to ‘Using slots’ and the tab is switched to First tab
  4. It no longer possible closing the popover by clicking on the page

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
GregPedencommented, Apr 13, 2017

So I did some digging… reactivity is best affected in the “updated()” reactivity event in VueJS components. This is called every time the DOM is updated in any context which concerns your component. So… when this is called, I just refresh the Tether position, which will cause itself to hide if the anchored element is not in the viewport.

I think this means that in the background the reposition call gets spammed whenever anything is happening like a page scroll and the Popover is shown, but… the cost for that is small, and this provides a universal solution for all cases.

See: https://github.com/bootstrap-vue/bootstrap-vue/pull/230

1reaction
GregPedencommented, Apr 11, 2017

Thanks, I’ll look in to this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap Tab within Popover isn't working - Stack Overflow
Tab content is not changing <-- PROBLEM. Tabs are created correctly and if you try them outside of popover they work fine.
Read more >
Bootstrap Popovers - examples & tutorial
Bootstrap popover is a component which displays a box with a content after a click on an element - similar to the tooltip...
Read more >
object on a slide control within a popover does not change ...
Put a slidecontrol inside a popover, name the tabs, use a script to "Go To Object" of the second tab, slidecontrol won't change...
Read more >
Popovers - Bootstrap
When a keyboard user opens a popover, focus remains on the triggering element, and as the popover usually does not immediately follow the...
Read more >
Popovers - React-Bootstrap
It's inadvisable to use "hover" or "focus" triggers for popovers, because they have poor accessibility from keyboard and on mobile devices. Click Hover...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found