]> git.ipfire.org Git - thirdparty/bootstrap.git/commit
Fix dropdown (and therefore typeahead) wrap 7288/head
authorpickypg <pickypg@gmail.com>
Fri, 15 Mar 2013 05:54:24 +0000 (02:54 -0300)
committerpickypg <pickypg@gmail.com>
Fri, 15 Mar 2013 05:54:24 +0000 (02:54 -0300)
commit812b99263f08d2306219ed6fcbe1685be17d6a10
treebe60126348cf698c53d618fbce1700d60dc1cc77
parent37d0a30589e8bd74299b2d857c348d91396563ed
Fix dropdown (and therefore typeahead) wrap

I have recently been experimenting with a lot of Typeahead controls, and I ran into a situation where my Typeahead was too wide for my screen, particularly on mobile devices, and it was not wrapping as I had expected it to do.

http://jsfiddle.net/Mtxkn/3/

Changing the CSS for `.dropdown-menu > li > a` to `white-space: normal` causes it to wrap in every scenario that I have seen, whereas leaving it as `nowrap` never does what I want when the text is too long for a given row.

It's possible that this has ramifications for other dropdown menus, but honestly I expect that even those would prefer to wrap than to extend the screen horizontally.  If that is not the case, then it would work to change the typeahead version of this only:

```css
.typeahead > li > a {
    white-space: normal;
}
```
less/dropdowns.less