show.bs.modal
test case – V3.4.1
Issue: Modal event.preventDefault()
for show.bs.modal
: disables modal with fade class from being displayed again in V4 & V5.
The JavaScript for Bootstrap V4 & V5 stops a modal from being displayed again, once displaying the modal has been prevented using event.preventDefault()
.
This JS Bin using Bootstrap V3.4.1 shows event.preventDefault()
working as expected:
show.bs.modal
event.event.preventDefault()
and nothing is displayed.The action of the show button can be confirmed through the developer console. As the listener is sent an event, the listener will log the button and the switch status. For V3.4.1, the console will log an action every time the button is clicked to show the modal.