bootstrap4 conf.close bug

bootstrap4 conf.close bug

we0038we0038 Posts: 39Questions: 13Answers: 1

consider this example
https://editor.datatables.net/examples/styling/bootstrap4.html

if user clicks NEW button then clicks again before modal is fully shown an error will occur:
Uncaught TypeError: d.close is not a function

to replicate it, try to click NEW button quickly multiple times.
this probably rarely to happen but I had to dedug it and report it.

one quick fix in editor.bootstrap4.js line 143
allowBackgroundClick = $(e.target).hasClass('modal') && conf.shown
to
allowBackgroundClick = $(e.target).hasClass('modal') && conf.shown && conf.fullyDisplayed

This discussion has been closed.