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 click blur trigger not closing popover on next click

See original GitHub issue

This issue is reproducible in the bootstrap vue playground https://bootstrap-vue.org/play

by pasting the following code block in the template section

<div>
  <a style="cursor: pointer; border: 1px solid black; padding: 5px;" title="Additional Actions" id="moreActions">
    <span>Click for actions</span>
  </a>
  <b-popover target="moreActions" triggers="click blur" placement="bottom">
    <div>
      <a style="cursor: pointer;" title="Test">Test</a>
    </div>
  </b-popover>
</div>

with the triggers=“click blur” property set, documentation reads as though it should close the popover when you click in the whitespace

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
tmorehousecommented, Apr 23, 2020

@jwells967 The main issue is that in he example you have the <a> without an href, so it is not an interactive element by default and cannot receive focus when it is clicked (click blur relies on the fact that the clicked element becomes the document active element and can therefore be blurred).

Either switch to an interactive element, like <button> or <a href="#">, or add a tabindex="0" (or -1) to the non-interactive element so that it is able to receive focus when clicked and will subsequently be able to be blurred when clicking elsewhere.

5reactions
jwells967commented, Jan 22, 2020

the playground is using the correct version and css and still the issue appears there.

should the documentation be altered?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Popover not closing when clicking outside its focus area
You can set triggers="click blur" on the popover. This will close it when the user clicks outside of the popover or on the...
Read more >
Popover | Components - BootstrapVue
Popovers can be triggered (opened/closed) via any combination of click , hover and focus . The default trigger is click . Or a...
Read more >
How to Dismiss a React-Bootstrap Popover on Click Outside
Another method to dismiss the popover is by using a different trigger event. You can use the hover or focus trigger instead of...
Read more >
Popovers · Bootstrap v5.0
Dismiss on next click. Use the focus trigger to dismiss popovers on the user's next click of a different element than the toggle...
Read more >
Popover - Chakra UI
Clicking outside or blurring out of the PopoverContent closes the popover. If you set closeOnBlur to false , it will not close. ARIA...
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