mirror of
https://github.com/jasny/bootstrap.git
synced 2026-04-24 03:00:49 -04:00
@@ -35,7 +35,7 @@
|
||||
|
||||
if (this.options.autohide && !this.options.modal) {
|
||||
var eventName = (navigator.userAgent.match(/(iPad|iPhone)/i) === null) ? 'click' : 'touchstart'
|
||||
$(document).on(eventName, $.proxy(this.autohide, this))
|
||||
$(document).on('click touchstart', $.proxy(this.autohide, this))
|
||||
}
|
||||
|
||||
if (this.options.toggle) this.toggle()
|
||||
@@ -324,6 +324,8 @@
|
||||
|
||||
OffCanvas.prototype.autohide = function (e) {
|
||||
if ($(e.target).closest(this.$element).length === 0) this.hide()
|
||||
var target = $(e.target);
|
||||
if (!target.hasClass('dropdown-backdrop') && $(e.target).closest(this.$element).length === 0) this.hide()
|
||||
}
|
||||
|
||||
// OFFCANVAS PLUGIN DEFINITION
|
||||
|
||||
Reference in New Issue
Block a user