Sitecore 6.0-7.0 and Chrome 37+ showModalDialog()

Since Chrome version 37, the deprecated showModalDialog has been disabled. Firefox is about to do the same and has been sending out deprecation warnings since version 28 as well. Sitecore version 6.0 to 7.0 uses this javascript method to open up dialog boxes, and Sitecore has released a patch for it. Sitecore 7.1 and above does not use this deprecated method.

RTE Show EditorThe patch works well in the Content Editor, but we’ve found that it doesn’t when running Sitecore in Desktop mode. When editing items, the “Show Editor” button no longer works for RichTextEditor fields. Looking at the javascript console you get the error “Cannot find RTE frame object”.

Show Editor Console ErrorMy great colleague Magnus Unger found a way to workaround this problem.

In /sitecore/shell/Applications/Content Manager/Content Editor.js in the function scContentEditor.prototype.editRichText (row 2399 in our 6.6 rev 130214 version, but this could vary), the first line looks like this after applying the Sitecore.Support.416400 patch:

var w = $('overlayWindow');

This doesn’t work in the Sitecore Desktop because the windows gets unique ID’s. By reverting this back into the original code that comes with a clean install, the code looks like this:

var w = $('overlayWindow') || Element.select(parent.document, '#' + frameElement.id + 'overlayWindow')[0];

After changing this line back to its original, the Show editor buttons works again.

7 thoughts on “Sitecore 6.0-7.0 and Chrome 37+ showModalDialog()

  1. What version of Sitecore were you running when you hit this issue? I just tried it with the Sitecore patch on 7.0. (rev. 130424) and it the ‘Show Editor’ button seems to work fine.

    • Aha, good to know. We ran into this issue on an old 6.6 system. Sitecore Support has verified this as a bug, but it may apply only to the 6.4.1-6.6.0 patch. Maybe the 7.0 patch is correct.

  2. Did they provide an updated fix for you? We have been able to replicate this on 6.6.0 (rev. 130111) but it doesn’t seem completely consistent.

    • Well, we found the problem, did the fix mentioned above and submitted it to Sitecore support. The verified it as an error and suggested going with the fix we did.

      Did you find further problems than doing this change to the .js file?

  3. we were experiencing the same issue. i followed your instructions and that solved our problem. Note: Delete browser cache/data on client machine after making change on js to load the fresh new js on client.

  4. Firstly, thanks for your efforts, guys!
    Just wanted to say that the fix resolved the problem within the content editor but I’ve still got the issue when I use the split screen ‘view related item’ from the page editor, i.e. no RTE modal!
    Anyone else get that?

Leave a Reply