niutech / showModalDialog

window.showModalDialog polyfill using a <dialog> element
https://niutech.github.io/showModalDialog/demo.html
Apache License 2.0
177 stars 88 forks source link

Non modal popup opens modal popup within the same dialog #52

Open apalik opened 3 years ago

apalik commented 3 years ago

I support an old VB.NET application that currently can only be executed on IE. I am updating it to use Edge/Chrome. There are hundreds of popup that use window.showModalDialog. This polyfill works very nicely for my needs (thanks so much) especially because the application is being rewritten but will take a long time. Except I have one problem. There is a non modal popup that needs to remain non modal. It opens a number of modal popups. The polyfill will open the modal popup within the container of the non modal popup. If the modal popup is larger than the first popup, it cannot extend beyond the borders of the first popup. I need to grab the parent of the first popup. I am a novice to JQuery (enough to fumble my way around). Can you help with what I need to do to accomplish this? Thanks.

apalik commented 3 years ago

I ended up just increasing the size of the original popup so any new popup opened from the original could fit inside.