Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 4.3.1 Broke PopConfirm

With the release of Bootstrap 4.3.1, PopConfirm stopped working. Whenever a PopConfirm instance is triggered, the buttons do not appear: no PopConfirm buttons

I recreated the issue here: https://www.codeply.com/go/2BWcRgi8mc I'm using the following dependencies and updated versions, loading them in the following order:

  • Bootstrap CSS 4.3.1
  • jQuery 3.3.1
  • popper.js 1.14.7
  • Bootstrap 4.3.1
  • PopConfirm 0.4.5

When I revert back to Boostratp 4.2.1, the buttons show up just fine: PopConfirm with buttons

PopConfirm issue: https://github.com/Ifnot/PopConfirm/issues/41

like image 385
bhall Avatar asked Oct 17 '22 06:10

bhall


1 Answers

that's because in v4.3.1 we introduced a sanitizer for Tooltip and Popover templates. By default this is what's authorized: https://getbootstrap.com/docs/4.3/getting-started/javascript/#sanitizer

but if you need to allow button you have to do:

$.fn.tooltip.Constructor.Default.whiteList.button = []

And buttons will appear

like image 113
Johann-S Avatar answered Oct 20 '22 19:10

Johann-S