Skip to content

Conversation

@jasonseney
Copy link

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!

@ericmmartin
Copy link
Owner

Thanks Jason! I hope to find some time soon to review a few changes and get a new version out.

@ericmmartin
Copy link
Owner

Hi Jason, thanks for the contribution. Do you think it is necessary to create additional options, or could this be "hard-coded" to keep the dialog within window boundaries?

@jasonseney
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants