vendor/assets/javascripts/twbs/bootstrap/modal.js in twbs_sass_rails-4.3.1 vs vendor/assets/javascripts/twbs/bootstrap/modal.js in twbs_sass_rails-4.4.0
- old
+ new
@@ -1,10 +1,10 @@
/* ========================================================================
- * Bootstrap: modal.js v3.3.6
+ * Bootstrap: modal.js v3.3.7
* http://getbootstrap.com/javascript/#modals
* ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
+ * Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
@@ -31,11 +31,11 @@
this.$element.trigger('loaded.bs.modal')
}, this))
}
}
- Modal.VERSION = '3.3.6'
+ Modal.VERSION = '3.3.7'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Modal.DEFAULTS = {
@@ -138,10 +138,12 @@
Modal.prototype.enforceFocus = function () {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
- if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+ if (document !== e.target &&
+ this.$element[0] !== e.target &&
+ !this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
}