mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
prevent dropdowns from closing when clicking inside form element inside dropdown
This commit is contained in:
parent
63bd7cb478
commit
663e41d74f
Binary file not shown.
4
docs/assets/js/bootstrap-dropdown.js
vendored
4
docs/assets/js/bootstrap-dropdown.js
vendored
@ -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 );
|
5
docs/assets/js/bootstrap-typeahead.js
vendored
5
docs/assets/js/bootstrap-typeahead.js
vendored
@ -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()
|
||||
}
|
||||
|
||||
|
4
js/bootstrap-dropdown.js
vendored
4
js/bootstrap-dropdown.js
vendored
@ -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 );
|
5
js/bootstrap-typeahead.js
vendored
5
js/bootstrap-typeahead.js
vendored
@ -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…
x
Reference in New Issue
Block a user