mirror of https://github.com/twbs/bootstrap.git
prevent dropdowns from closing when clicking inside form element inside dropdown
This commit is contained in:
parent
63bd7cb478
commit
663e41d74f
Binary file not shown.
|
|
@ -86,7 +86,9 @@
|
|||
|
||||
$(function () {
|
||||
$('html').on('click.dropdown.data-api', clearMenus)
|
||||
$('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||
$('body')
|
||||
.on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
|
||||
.on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||
})
|
||||
|
||||
}( window.jQuery );
|
||||
|
|
@ -39,8 +39,9 @@
|
|||
|
||||
, select: function () {
|
||||
var val = this.$menu.find('.active').attr('data-value')
|
||||
this.$element.val(val)
|
||||
this.$element.change();
|
||||
this.$element
|
||||
.val(val)
|
||||
.change()
|
||||
return this.hide()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,9 @@
|
|||
|
||||
$(function () {
|
||||
$('html').on('click.dropdown.data-api', clearMenus)
|
||||
$('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||
$('body')
|
||||
.on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
|
||||
.on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
|
||||
})
|
||||
|
||||
}( window.jQuery );
|
||||
|
|
@ -39,8 +39,9 @@
|
|||
|
||||
, select: function () {
|
||||
var val = this.$menu.find('.active').attr('data-value')
|
||||
this.$element.val(val)
|
||||
this.$element.change();
|
||||
this.$element
|
||||
.val(val)
|
||||
.change()
|
||||
return this.hide()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue