I want to close modal ONLY when user clicks on close btn. As I see I need to overwrite this part of code from modal.js:
hide: function (e) {
e && e.preventDefault()
var that = this
e = $.Event('hide')//if I delete this line modal won't hide
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
$('body').removeClass('modal-open')
escape.call(this)
this.$element.removeClass('in')
$.support.transition && this.$element.hasClass('fade') ?
hideWithTransition.call(this) :
hideModal.call(this)
Am I on the right path?