Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue with clicking modal contents closing the modal.

  • Loading branch information...
commit ba86eeea556738b41b5cf1422e521e0e64c8719d 1 parent 73157c1
@aroc authored
Showing with 8 additions and 10 deletions.
  1. +8 −10 bootstrap-scroll-modal.js
View
18 bootstrap-scroll-modal.js
@@ -54,8 +54,6 @@
if (this.isShown || e.isDefaultPrevented()) return
- // $('body').addClass('modal-open')
-
this.isShown = true
this.escape()
@@ -105,8 +103,6 @@
this.isShown = false
- // $('body').removeClass('modal-open')
-
this.escape()
$(document).off('focusin.modal')
@@ -204,13 +200,15 @@
$('body').css({ 'overflow' : 'hidden' })
- // end additions
+ this.$backdrop.on('click', function(e){
+ if (that.options.backdrop == 'static') {
+ $.proxy(that.$element[0].focus, that.$element[0])
+ } else if (e.target == e.delegateTarget) {
+ that.hide(e)
+ }
+ })
- this.$backdrop.click(
- this.options.backdrop == 'static' ?
- $.proxy(this.$element[0].focus, this.$element[0])
- : $.proxy(this.hide, this)
- )
+ // end additions
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
Please sign in to comment.
Something went wrong with that request. Please try again.