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:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\EnableDeprecatedWebPlatformFeatures
Under the 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.
Hello, I followed your guide step-by-step, but it seems that Chrome just ignores any manual modification to the Windows Registry. Seems to be a known issue in the Chromium community, and I still don’t find a solution. Any suggestion?
Thank you
@Giorgio strange, the above fix worked on my personal workstation both for standard Chrome (currently Version 37.0.2062.103 m) and 64bit Canary (currently Version 39.0.2145.0). What version of Chrome/Windows are you on? Have you tried reboot the machine after registry change?
Hello,
I am having the same problem. I really need to fix this, because Chrome 37 just broke compatibility with our Outlook web app.
I tried your fix, creating the registry value exactly the way you did it (I even copy-pasted the key and value names from your blog post), but without success. I also tried creating it in “Wow6432node” — since my OS is on 64 bit and Google runs on 32 bit — but this didn’t do anything either.
Yeah, I can confirm that this did not work for me on Windows 8.1 Basic either. Manually created the keys and value and triple checked to make sure it was in the right place and spelled correctly. Rebooted machine and went to chrome://policy and that policy is still not set and the modal dialogs still do not work.
Additionally, it seemed backwards that the Name of the key is 1 and value is the name of the property. So I swapped them making the name of the key “ShowModalDialog_EffectiveUntil20150430” and set the value to “1”, rebooted, and tried again, but still no luck. Perhaps it’s an OS version issue.
Yea, this registry edit only works on machines joined to a domain. The best way is to use the Chrome Enterprise ADMs.
Unfortunately, I don’t think Home editions have gpedit.msc. Luckily there is Apply_LGPO_Delta from http://blogs.technet.com/b/fdcc/archive/2008/05/07/lgpo-utilities.aspx
Funny thing I tried to apply this policy setting via ADM (downloaded from http://www.chromium.org/administrators/policy-templates) and imported via gpedit.msc (Windows XP SP3 machine not connected to domain). Didn’t work. But the registry settings worked. Strange.
UPDATE It DID work on another machine (Windows 7, not connected to the domain) so I will add this to the post, thanks
So I followed this hack and seems this seems to work on Chrome 37. However I upgraded to Chrome 38 beta version and this didnt work. The login page seems to be blank or something ( yes our login itself is modal).
So wanted to ask- was this hack specifically for 37 or is it that since chrome 38 is beta they might not have added support for this flag yet but will probably do so before they launch 38 in live ?
@SiddharthSharma my “main” version of chrome is 37, but I also run 64-bit Canary version and this one is 39, the fix work there as well.
In your case if modal dialog appears, but its content is blank, that means that showModalDialog worked and something else is going on in that Beta.
Does anyone how to do this in Mac? Need to fix it in my Mac.
Thanks.
Yoda
@yoda I haven’t tried it myself, but according to http://www.chromium.org/administrators/policy-list-3#EnableDeprecatedWebPlatformFeatures under Preference Name
EnableDeprecatedWebPlatformFeatures
you set the value<array><string>ShowModalDialog_EffectiveUntil20150430</string></array>
The Light version of OWA allows files to be attached in Chrome 37.
Better instructions for Mac users: http://www.chromium.org/administrators/mac-quick-start
HI All,
for windows 8.1 OS users, this will work with the 1st work around by setting the ShowModalDialog_EffectiveUntil20150430 to 1. we need to follow the same steps but under HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE.
Thanks
Jagadeesh
FYI,
I have tried this same work around (registry edit fix) on a windows 8.1 PC and it works fine. Be sure to not typo the keys being created or the string being created. also, be sure that it IS a string and not something else.
Hope this helps a little.
Here is what I have found:
Domain environment Windows 7 Pro/Ent:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\EnableDeprecatedWebPlatformFeatures] “1”=”ShowModalDialog_EffectiveUntil20150430″
or with GPO
Import Chrome ADMX group policy template
Enable deprecated web platform features with the value ShowModalDialog_EffectiveUntil20150430
Window 8.1 Pro NO DOMAIN:
Reg fix does not work (both HKLM HKCU)
This works: download Chrome ADMX Group Policy Templates
Copy Chrome.admx and the adml file from en-US folder to C:\Windows\PolicyDefinitions and C:\Windows\PolicyDefinitions\en-US
Open gpedit.msc
Enable deprecated web platform features with the value ShowModalDialog_EffectiveUntil20150430
Windows 8.1 Home
There is no native gpedit.msc to add the chrome policy….
Lastly to see if the policy is working open Chrome://policy
Applies to/Level/Policy name/Policy/value/Status
Machine/Mandatory/EnableDeprecatedWebPlatformFeatures/ShowModalDialog_EffectiveUntil20150430/OK