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.

Popover with `data-trigger="focus"` does not work on iOS Safari when used on <a> without `class="btn"`

See original GitHub issue

After #11788 and #14156 the popover with data-trigger="focus" is working very well. However, there is a super weird bug that only happens in iOS safari.

Consider the following 2 <a>, the only difference between them is class="btn".

  <a tabindex="0" role="button" data-toggle="popover" data-trigger="focus"
      class="btn"
      data-content="...">
    Popover anchor w/ class 'btn'
  </a>

  <a tabindex="1" role="button" data-toggle="popover" data-trigger="focus"
      data-content="...">
    Popover anchor w/o class 'btn'
  </a>

The problem is, popover works fine for the first <a>, but not the second.

Hope the recording below will help better illustrating the problem:

1

Demo Plunker: http://embed.plnkr.co/M0NIAPtXOet8ppl2dShP/preview (Please open using iPhone or iOS simulator. OSX Chrome, Android Chrome, OSX Safari, OSX Firefox works perfectly on both <a>s.)


It seems that the focus event is somehow not triggered in iOS Safari. When I put a breakpoint in the focus event callback, the first <a> invokes the callback as expected while the second <a> does not.

2

No idea why this happens ._.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
cvrebertcommented, Feb 28, 2015
1reaction
cvrebertcommented, Mar 23, 2015

@DavidVII That’s a very different problem. As already mentioned in the docs, tabindex is always required for dismiss-on-next-click popovers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap popover is not working on iPad safari - Stack Overflow
Sometimes you need it to work with data-trigger="focus" and for those instances to be platform independent you should follow this example:
Read more >
Bootstrap Popover bug with focus trigger undismissible on iOS ...
Nevertheless, the real issue is probably about iOS and the bootstrap's popover with data-trigger="focus", because if you take a look at the bootstrap...
Read more >
Bootstrap Popover Bug With Focus Trigger Undismissible On ...
Popover with datatriggerfocus does not work on iOS Safari when used on <a> without classbtn #15935. Closed. MrOrz opened this issue.
Read more >
Popovers - Bootstrap
Things to know when using the popover plugin: Popovers rely on the 3rd ... Triggering popovers on hidden elements will not work. Popovers...
Read more >
If Safari isn't loading websites or quits on your iPhone, iPad, or ...
If you can't load a website or webpage, or Safari quits unexpectedly, ... Try to load a website, like www.apple.com, using cellular data....
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