onsdag den 5. november 2014

Unable to close the rich text editor in page editor mode after applying Chrome 37 patch from Sitecore

A while ago, Google updated Chrome so it no longer supports the showModalDialog javascript function, which causes it to break Sitecore on Chrome (other browsers are following along soon, so if you aren't using Chrome, you still have to think about this issue).

To see if you are affected, please take a look at this knowledgebase article, and apply it if it is needed for your Sitecore version.

When the patch have been applied however, there is a new issue that is introduced, which is that you can not close the rich text editor in the page editor by clicking the buttons.

You can edit and save just fine, but the window does not close when it should (you can use the cross in the top right corner, but that is not userfriendly to have to force the users to do this).

There is a small fix for this issue:
  1. Open the “[Website]/sitecore/shell/Controls/Rich Text Editor/EditorPage.js” file.
  2. Replace the following line in the “scCloseEditor” method:
window.close();

With:

if (top._scDialogs.length != 0) {
       top.dialogClose();
} else {
       window.close();
}

This fixes the issue, so it once again is possible to have the dialogs closing when they should.

Ingen kommentarer:

Send en kommentar