A possible flaw about `modal.toggle` method
Created by: ktmud
modal.toggle
passes an related target to hide
:
Modal.prototype.toggle = function (_relatedTarget) {
return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
}
But hide()
accepts an event as argument:
Modal.prototype.hide = function (e) {
if (e) e.preventDefault()
e = $.Event('hide.bs.modal')
this.$element.trigger(e)
Is this by design or not?