Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added minimum left and top properties for positioning the dialog #2
Hey Eric, I noticed that if you size down the browser, it doesn't constrain the top or left position properties. This causes the dialog to be positioned "off screen" in a window that is shorter or narrower than the centered dialog.
I added two options for minLeft and minTop (with generic defaults of 0) to check against when calculating position.
Hope you find this as useful as I did, thanks!
I think it at a minimum it should simply constrain to the window boundaries (0,0). I added the option since I wanted additional margins between my modal dialog and the window so the user with a small window would be able to see some of the overlay on the left and top.
I can understand you wouldn't want the option list to grow out of control, and personally I think "hard-coding" it in for now would be the most important to update. Could always go back and add the additional options later if other users bring it up.