uxsolutions / bootstrap-datepicker

A datepicker for twitter bootstrap (@twbs)
Apache License 2.0
12.67k stars 6.06k forks source link

No vertical scrollbar after closing Bootstrap Modal if datepicker was opened #812

Open johnaau opened 10 years ago

johnaau commented 10 years ago

My problem occurs if I have an datepicker inside a bootstrap modal and only occurs if the date picker is used.

The problem is that after using the date picker then closing the modal the page does not have a vertical scrollbar, which it should do as the content extends past the end of the viewable area.

I have created a jsfiddle to illustrate the problem. If you click the submit query button without opening the date picker you get a scroll bar, but if you open the date picker first then you don't get a scroll bar.

http://jsfiddle.net/8m2v2/5/

evelim commented 10 years ago

Try include this in your css
html { /* This prevents the page from shifting when a modal is opened e.g. search / overflow-y: auto;
} .modal,.modal.in,.modal-backdrop.in { /
These are to prevent the blank space for the scroll bar being displayed unless the modal is > page height */ overflow-y: auto; }