Closed mhahmadilivany closed 6 years ago
Have you tried using the dialog polyfill?
thanks but it didn't help me. I'm searching minimum cost code changing solution, but I couldn't find anything yet. I edited showModalDialog.js file and solved shoModal() and close() problem, but in async programming I have problem. because editing whole of my websites with spawn(function*(...)) is so hard and now return value is just undefined. I need something to pause code execution on window.showModalDialog(...) line and after closing popup program continues. something such yield does on generator. would you help me?
The polyfill provides the eval()
fallback if you don't want to use generators. It throws an exception in showModalDialog()
, which stops running the code in the surrounding function. Then it evaluates the rest of the function code (with returnValue
set) on dialog close.
thank you, I used this, but after throwing exception, the page refreshes in my project! why? I compare my code with your demo and there is no different.
excuse me, I closed issue mistakely :)) please continue your helps. thanks
The web page should not refresh on thrown exception unless some JS code in onerror
handler forces to do so. Could you provide a minimal Proof of Concept on JSBin/JSFiddle?
I got several problems and decided to migrate to jquery modal at last, thank you
hello. I have some huge asp.net website projects, using showModalDialog for popups and using dialog-polyfill. As you know, mozilla doesn't support dialog.showModal() function anymore. So my website have problem for opening popups, all popups have return values too. Changing config of mozilla disturbs users. Is there any solution for me to continue using this function and do not change config?