In the newest release of Chrome (37), the showModalDialog function is disabled by default (Chromium Blog). This change will affect all Sitecore instances using version lower than 7.1.
Fortunately, there are options to workaround the issue.
The first approach is to enable the showModalDialog function via the EnableDeprecatedWebPlatformFeatures policy. For more information on how to set policies you can refer to one of these two articles depending on your organization – Set Chrome policies for devices or Set Chrome policies for users. Keep in mind that this fix needs to be applied on every device.
The second approach is to replace the showModalDialog function with window.open. This should be done in [Web_Root]\sitecore\shell\Controls\Gecko.js. There are two functions which should be modified. scBrowser.prototype.prompt Modify the following line (Line 231 in the JS file): From return showModalDialog(“/sitecore/shell/prompt.html”, arguments, features); To return window.open(“/sitecore/shell/prompt.html”, arguments, features); scBrowser.prototype.showModalDialog Modify the following line (The line number varies for different versions of Sitecore. For Sitecore 7.0 it is Line 350 and for Sitecore 6.6 Line 345): From showModalDialog(url, arguments, features); To window.open(url, arguments, features); The big difference is that now the opened windows will not block the GUI, because they are opened in a new browser window and the fabulous dim effect is gone :).
Hope this will help you stick to your favorite browser !
Here are some useful links from other sources:
Main SDN Discussion Thread – PSA: showModalDialog disabled by default in Chrome 37
Blog Post By Dheer Rajpoot which covers the chrome policies approach in details – Sitecore Modal Pop-ups are not working in Chrome
Blog Post By Ben McCallum – Sitecore modals and problems in newer browsers
Blog Post By Kamruz Jaman using jQuery UI Dialog – Fix for Dialog Modals not working in Sitecore in Chrome 37+ browsers
Sitecore KB – Sitecore does not work in Chrome 37 and later
3 thoughts on “Sitecore Modal Dialogs Fix For Chrome 37+”
Thanks for the mention. This is a tricky issue as I’m all for progress and can understand dropping such an old and crappy browser feature. Hopefully it doesn’t cause too much of a headache. Cheers, Ben.
Looks like everyone is battling the same fire! Although this kind of works for most scenarios, any function expecting the return value no longer works. The biggest is Package Installation Wizard, you can no longer select a file. There are some other minor things I mentioned, but it may be enough for your average content editor to live with…
The problem is that the links, media and other stuff also stops working. That is why I gave up from the js solution. It would be too much trouble modifying the sheer controls in order to work with this kind of solutions. Enabling the deprecated method seems like the best solution for now.