We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4e27c63 + e9505f2 commit ade9f48Copy full SHA for ade9f48
js/offcanvas.js
@@ -35,7 +35,7 @@
35
36
if (this.options.autohide && !this.options.modal) {
37
var eventName = (navigator.userAgent.match(/(iPad|iPhone)/i) === null) ? 'click' : 'touchstart'
38
- $(document).on(eventName, $.proxy(this.autohide, this))
+ $(document).on('click touchstart', $.proxy(this.autohide, this))
39
}
40
41
if (this.options.toggle) this.toggle()
@@ -324,6 +324,8 @@
324
325
OffCanvas.prototype.autohide = function (e) {
326
if ($(e.target).closest(this.$element).length === 0) this.hide()
327
+ var target = $(e.target);
328
+ if (!target.hasClass('dropdown-backdrop') && $(e.target).closest(this.$element).length === 0) this.hide()
329
330
331
// OFFCANVAS PLUGIN DEFINITION
0 commit comments