You know you shouldn’t use
showModalDialog to open modal windows – it’s bad taste and prone to cause issues. Unfortunately many applications (especially Enterprise ones) rely on the method ability to halt code execution until the window closed (e.g. user answers a YES/NO question).
Tough luck, starting version 37 Google Chrome removed support for
showModalDialog. Your code suddenly began to act in weird and unpredictable way. You definitely should rework it to use a different approach to dialogs. Fortunately Google gives you a bit more time. You can re-enable
showModalDialog support, but only temporarily – until May of 2015.
Here’s how to do it in Chrome for Windows. Open Registry Editor (regedit) and create following keys:
EnableDeprecatedWebPlatformFeatures key create a string value with name 1 and value of ShowModalDialog_EffectiveUntil20150430. To verify that the policy is enabled, visit chrome://policy URL.
UPDATE If the above didn’t work for you here’s another method to try (Thank you, Yuhong Bao).
- Download Chrome ADM templates from http://www.chromium.org/administrators/policy-templates
- Extract and import policy relevant to your locale (e.g. windows\adm\en-US\chrome.adm. You can import either via gpedit.msc or using these utilities on Home editions of windows: http://blogs.technet.com/b/fdcc/archive/2008/05/07/lgpo-utilities.aspx)
- Under “Adminstrative Templates” locate Google Chrome template and enable “Enable Deprecated Web Platform Feautes”. Open the feature and add “ShowModalDialog_EffectiveUntil20150430” key.