Bootbox not working with BS4 page - poss bug?

I have some bootbox confirmations, alerts, prompts etc. on a BS4 project and they no longer seem to work since the recent addition of Bootbox for BS5.

e.g. I add a simple button to a page:

<button id="btn5" class="btn" dmx-on:click="run({'bootbox.confirm':{buttons:{confirm:{label:'Yes'},cancel:{label:'No'}},message:'Choose',title:'Which?',centerVertical:true,then:{steps:{alert:{message:'yes'}}},else:{steps:{alert:{message:'no'}}}}})">Button</button>

to display a native alert depending on which button was pressed. The cancel (No button) does not dismiss the Bootbox modal, the close X doesn’t display properly and doesn’t close the modal. Neither of tehse two ‘cancel’ actions trigger the else event as it looks like it is the closing of the modal that triggers it. The OK (Yes) button does show the alert but doesn’t hide the modal.
image

It looks like the modal classes are now only suitable for BS5 which makes it break my BS4 pages

I don’t know if it’s right but I now have:

<script src="/dmxAppConnect/dmxBootbox/bootbox.all.min.js" defer=""></script>
<script src="/dmxAppConnect/dmxBootbox/dmxBootbox.js" defer=""></script>

as well as

<script src="/dmxAppConnect/dmxBootbox5/bootstrap-modbox.min.js" defer=""></script>
<script src="/dmxAppConnect/dmxBootbox5/dmxBootbox5.js" defer=""></script>

in the <head>

Should the Bootbox5 ones be added if it’s a BS4 project?

If I remove the Bootbox5 ones the page works again, but as soon as I add/edit a bootbox flow action, they are added again…

Bump - this keeps breaking my projects as it updates the head page without me realising when I save a sub page

Fixed in Wappler 5.0.0 Beta 6

This topic was automatically closed after 24 hours. New replies are no longer allowed.