You could split your problem in three parts:
1. the scrollbar
By default the dropdown menu get a fixed (max) height of 340px (and a overflow-y:auto, see also: Twitter bootstrap 3 navbar navbar-right outside navbar-collapse).
You can undo this max-height by remove it (line 52 max-height: 340px;
) from navbar.less and recompile Bootstrap. Or add some css after Bootstrap's css in your document:
@media(max-width:767px)
{
.navbar-collapse {
max-height: none;
}
}
Note when the height of the menu becomes the height of your screen, you can't scroll your content due to the fixed position of your navbar.
2. open the dropmenu on collapse
On the first sight you should add an open class to the dropmenu on collapse, but the clearmenus function of dropdown.js will remove this class. Adding a display:block will show the dropdown menu, but its state /display will be like non collapsed.
A solution will be to add a class with the same styles as the open
class which won't be remove by the clearmenus.
$(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
$('.navbar-collapse .dropdown-toggle').parent().addClass('opened');
});
To give the opened class the same styles as the open class you will need to change your .less files and recompile Bootstrap after it.
in navbar.less (line: 215)
// Dropdowns get custom display when collapsed
.open .dropdown-menu, .opened .dropdown-menu {
in dropdown.less (line: 119)
// Open state for the dropdown
.opened, .open {
resize
With the above the dropdown menu stays visible after undo the collapse (by resizing the screen) to prevent this add some css after Bootstrap's CSS (you could also add this to your Less files):
@media(min-width:768px)
{
.nav > li.opened .dropdown-menu {display: none;}
.nav > li.open .dropdown-menu {display: block;}
}
styling of the links in the dropdown
Your navbar use navbar-inverse to style it (see also: https://stackoverflow.com/questions/18936357/using-multiple-navbars-with-twitters-bootstrap-3/18936358#18936358)
Navbar-inverse will be defined in navbar.less too. To set the link colors for the opend class too, use:
@media (max-width: @screen-xs-max) {
// Dropdowns get custom display
.open .dropdown-menu, .opened .dropdown-menu {
3. remove the dropdown link
css after Bootstrap's CSS:
@media(max-width:767px)
{
.nav > li > a.dropdown-toggle{display:none;}
}
Demo: http://jsfiddle.net/pgK4y/
See also: https://github.com/twbs/bootstrap/issues/10758