ericmmartin / simplemodal

A modal dialog framework for jQuery
http://simplemodal.com/
Other
506 stars 229 forks source link

Use outerHeight and account for padding, margins, border #37

Open ergophobe opened 11 years ago

ergophobe commented 11 years ago

.simplemodal-container is the same height as simplemodal-wrap, but that means that if the CSS applies margin, borders or padding and you have long content that scrolls, the modal is bigger than the window.

So the height should be window height - (margin + border + padding)

As a simple check, outerHeight should be <= window height.

ergophobe commented 11 years ago

er... sorry outerHeight(true) should be <= window height