Ticket #4514: 4514.patch

File 4514.patch, 908 bytes (added by Garry Yao, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    637637                                });
    638638                }
    639639        });
     640
     641        // Fixing Firefox 'Back-Forward Cache' break design mode.
     642        if( CKEDITOR.env.gecko )
     643        {
     644                CKEDITOR.document.getBody().setAttribute(
     645                                'onpageshow',
     646                                'event.persisted && CKEDITOR.tools.callFunction(' +
     647                                CKEDITOR.tools.addFunction( function()
     648                                {
     649                                        var allInstances = CKEDITOR.instances,
     650                                                editor,
     651                                                doc;
     652                                        for( var i in allInstances )
     653                                        {
     654                                                editor = allInstances[ i ];
     655                                                doc = editor.document;
     656                                                if( doc )
     657                                                {
     658                                                        doc.$.designMode = 'off';
     659                                                        doc.$.designMode = 'on';
     660                                                }
     661                                        }
     662                                } ) + ')');
     663        }
    640664})();
    641665
    642666/**
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy