Input Field in Dropdown

In your bootstrap-dropdown.js comment source code row

$('html').on('click.dropdown.data-api', clearMenus)

and write there this:

$(document).bind('click', function(e) {
    var $clicked = $(e.target);
    if (!$clicked.hasClass("dropdown-menu") &&
            !$clicked.parents().hasClass("dropdown-menu")){
        clearMenus();
    }
});

Or, you can add the following to your jQuery script

 $('.dropdown-menu').find('form').click(function (e) {
    e.stopPropagation();
 });

Leave a Reply