I am having an issue similar to this (Bootstrap dropdown closing when clicked), and I have tried the suggestions as listed, but the dropdown still closes when it is clicked on. The goal is to not have the dropdown close when you go to enter information in the input fields.
http://test.pf-db.com:3000/# (See 'Sign In' at upper right)
I have tried placing this code in the head, at the beginning of the body, and at the end.
<script>
$('.dropdown').dropdown().on("hide.bs.dropdown", function(e) {
if ($.contains(dropdown, e.target)) {
e.preventDefault();
//or return false;
}
});
</script>
I have also tried this
<script>
$('.dropdown').dropdown().on("hide.bs.dropdown", function(e) {
if ($.contains(dropdown, e.target)) {
e.stopPropagation();
//or return false;
}
});
</script>