Bootstrap modal options manipulation issue after initialisation.
Created by: samuelting
Problem:
According to documentation in https://getbootstrap.com/docs/4.0/components/modal/#via-javascript, modal options can be passed via javascript $().modal method. However, after the modal is initialised, when I passes another option object into .modal method as parameter, newer options is not effective.
For example, initially, the #exampleModal has its options set as
$("#exampleModal").modal({
"backdrop": "static",
"show": false
})
#examplemodal behaves as expected. The user cannot dismiss the modal by clicking the backdrop. However, in another part of the program, when I try to set the option of #exampleModal to be this one
$("#exampleModal").modal({
"backdrop": true
})
However, The modal cannot be dismissed when the user click the backdrop of the modal.
Expected behavior:
The modal can be dismissed by clicking the backdrop after "backdrop": true option is set.