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.

<b-popover>: button\link must be clicked once (instead of twice) to close popover which is opened inside mounted()

See original GitHub issue

In order to close popover which is opened by the code:

  mounted() {
    this.$nextTick(function() {
      this.$root.$emit("bv::show::popover", "popoverBtn");
      this.$root.$emit("bv::show::popover", "popoverLink");
    });
  }

right now it is necessary to click a button/link twice, however popover should be closed just on a single click. All the rest subsequent open/close clicks work as expected.

OS: Ubuntu 18.04 64; Browsers: Chrome 70.0.3538.102 (Official Build) (64-bit) + Firefox 63.0 (64-bit) Bootstrap-vue: v2.0.0-rc.11

DEMO

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tmorehousecommented, Nov 17, 2018

in bootstrap V4 native code, if a popover or tooltip is opened programmatically, it is called a manual trigger, and is stored in the active triggers object. and in order to close the popover or tooltip, all active triggers have to be cleared (i.e. any click, focus, or hover, as well as manual).

bootstrap-vue is similar, but we allow manual triggers to be ignored (allowing the user to close it, although they need to trigger the element first to activate their trigger, and then they clear it with the next trigger (we don’t store the manual trigger in the active triggers object)

it might be possible for us to first check to see of the tip is opened and there are no triggers in the trigger object, then we just close the tip.

0reactions
tmorehousecommented, May 6, 2020

Since this would be quite the breaking change, and rub against the grain of Bootstrap v4 behaviour, I think we should close this issue until Bootstrap V5 is released

Read more comments on GitHub >

github_iconTop Results From Across the Web

need click twice after hide a shown bootstrap popover
Popever on its own works fine. Try this, click on popover and activate the tooltip thing, then hide it using hide button, and...
Read more >
request - close popover when clicked inside · Issue #76 - GitHub
Recently we came across a use case where i am using button inside the popover. I am using that button to duplicate a...
Read more >
Popover | Components - BootstrapVue
I.e. if a popover has the trigger focus click , and it was opened by focus , and the user then clicks the...
Read more >
Popovers - Bootstrap
Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site.
Read more >
Popover - Chakra UI
Popover is a non-modal dialog that floats around a trigger.
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