kylefox/jquery-modal — pull request #66 by chapterhouse-io (2014-01-04 23:56:00+00:00)
Title: Add a 'maxHeight' option to prevent modals from extending past the screen

I encountered an issue with modals that contain more content than is viewable
on the screen, or are viewed in on a small screen/browser window.

To get around this, I've added an option called maxHeight, which limits the
vertical percentage of the screen that the modal will take up. It has a default
value of null, which results in the current behavior. If you set it to a
decimal (i.e. 0.90 for 90%), it will take the following actions:

* Apply the max-height, overflow-x (hidden), and overflow-y (auto) properties to
the modal before applying centering logic
* Create an event handler for the window.resize event that calls $.modal.resize
* Removes the handler on modal close

I've also updated the README and examples page accordingly.

There is one small issue introduced by maxHeight - the addition of overflow-y
may add a scroll bar to the modal, which can potentially cover up a close icon.
Since there's no way to place an element above the browser chrome, or other
universal positioning fix, handling this case is left as an exercise for the
user.

Intermediate commits:

Add example/test case

Add max-height if set, create handler to call resize on .resize event, still
need to figure out close icon

Update README.md accordingly

Re-minify with Closure Compiler with default options

We only need to set up maxheight and overflow properties on open(), not center()