forked from jibe914/Bootstrap-Confirmation
-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
Hi Mistic!
jQuery 3.6.0, Bootstrap 4.3.1, popper 1.14.7 Bootstrap Confirmation 4.2.1
After using dispose method on created instance its not possible to initialize new instance of confirmation. Example of bug:
<link rel="stylesheet" href="\css\bootstrap.css">
<script src="/js/jquery.js"></script>
<script src="/js/popper.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/bootstrap-confirmation.js"></script>
<button class="btn btn-default btn-sm btn-success " data-toggle="confirmation" id="btn-1">BTN1</button><br>
<button class="btn btn-default btn-sm btn-success " data-toggle="confirmation" id="btn-2">BTN2</button><br>
<button class="btn btn-default btn-sm btn-success " data-toggle="confirmation" id="btn-3">BTN3</button><br>
<script>
confirmation();
function confirmation() {
let confirmOptions1 = {
rootSelector: '[data-toggle=confirmation]',
title: 'OPCJA 1',
}
let confirmOptions2 = {
rootSelector: '[data-toggle=confirmation]',
title: 'OPCJA 2',
}
// using popover works fine; using confirmation extension not working
let confirmationInstance = $('[data-toggle=confirmation]').confirmation(confirmOptions1);
$('#btn-1').confirmation('dispose');
// new instance on #btn-1 after dispose works only with popover
$('#btn-1').confirmation(confirmOptions2);
}
</script>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels