Open titaniumteeth opened 10 years ago
I can confirm this.
Confirming as well.
+1
The 'shown.bs.modal' event is triggered by
$el.modal({
keyboard: this.options.allowCancel,
backdrop: this.options.allowCancel ? true : 'static'
});
The event binding follows immediately after, so the event listener doesn't exist when the event is triggered.
It appears that in the master branch, the code now looks like this:
$el.modal(_.extend({
keyboard: this.options.allowCancel,
backdrop: this.options.allowCancel ? true : 'static'
}, this.options.modalOptions));
So in theory (i havent tested this yet) you could add 'show': false to the options and have it create but not display the modal, then the event listener would be added, then you could show the modal at your leisure and the event should be handled.
If I set animate: true, then shown event is working just fine.
Issue demo: http://jsfiddle.net/nzLSA/40/