Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

data-trigger conflicts with bootstrap popover. #1911

Closed
abixalmon opened this issue Apr 12, 2018 · 8 comments
Closed

data-trigger conflicts with bootstrap popover. #1911

abixalmon opened this issue Apr 12, 2018 · 8 comments

Comments

@abixalmon
Copy link

Fancybox takes over bootstrap's data-trigger on Popover and Tooltip.

@fancyapps
Copy link
Owner

fancyapps commented Apr 13, 2018

Why would you want to have fancybox and popover on the same element. You have to choose one of them, because triggering both of them on click event ... just does not make any sense.

Tooltip, however, works perfectly fine, because it gets triggered on hover action. Disable back focus using backFocus option (or simply add data-back-focus="false" yo your elements) to prevent triggering tooltip after closing fancybox.

@abixalmon
Copy link
Author

No data-gallery added.

<a class="btn btn-lg btn-danger" role="button" data-toggle="popover" data-trigger="focus" title="" data-content="And here's some amazing content. It's very engaging. Right?" data-original-title="Dismissible popover">Dismissible popover</a>

When clicked it loads fancybox.
capture

@fancyapps
Copy link
Owner

Hmm, but you have data-trigger and that is also used to trigger fancybox on other element. This is how you can disable that -

$(document).off("click.fb-start", "[data-trigger]");

@ionesculiviucristian
Copy link

Maybe consider adding vendor prefixes for data attributes in the future?

@bez4pieci
Copy link

Please reopen this. data-trigger is used for specifying the way the Bootstrap popover appears, namely, hover or click. At least, pleaese add this potential clash issue to documentation.

@RomanMV
Copy link

RomanMV commented Jun 7, 2018

Please reopen this. Uncomfortable seek out all the places where this attribute may be used. Moreover, you can not immediately understand that it is because of this attribute that the functional that worked before.
The best idea would be to rename the attribute to something like this "data-fancybox-trigger"

VC-WhitchurchA added a commit to VC-WhitchurchA/fancybox that referenced this issue Jun 10, 2018
Fix fancyapps#1911 
Added vendor prefix to prevent conflict with Bootstrap `data-trigger`
@aliechti
Copy link

aliechti commented Oct 4, 2018

Why is it self initializing at all?

@fancyapps
Copy link
Owner

Sorry, I forgot to notify here that data-trigger has been renamed to data-fancybox-trigger some time ago, see https://github.com/fancyapps/fancybox/releases

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants