776 | | body.setAttribute( 'onpageshow', body.getAttribute( 'onpageshow' ) |
777 | | + ';event.persisted && CKEDITOR.tools.callFunction(' + |
778 | | CKEDITOR.tools.addFunction( function() |
779 | | { |
780 | | var allInstances = CKEDITOR.instances, |
781 | | editor, |
782 | | doc; |
783 | | for ( var i in allInstances ) |
784 | | { |
785 | | editor = allInstances[ i ]; |
786 | | doc = editor.document; |
787 | | if ( doc ) |
788 | | { |
789 | | doc.$.designMode = 'off'; |
790 | | doc.$.designMode = 'on'; |
791 | | } |
792 | | } |
793 | | } ) + ')' ); |
794 | | } |
795 | | } )(); |
796 | | |
797 | | } |
798 | | })(); |
| 773 | // Follow the host application's text direction. (#4968) |
| 774 | CKEDITOR.config.contentsLangDirection = CKEDITOR.config.contentsLangDirection |
| 775 | || CKEDITOR.document.getBody().getComputedStyle( 'direction'); |
| 776 | |
| 777 | // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514) |
| 778 | if ( CKEDITOR.env.gecko ) |
| 779 | { |
| 780 | body.setAttribute( 'onpageshow', body.getAttribute( 'onpageshow' ) |
| 781 | + ';event.persisted && CKEDITOR.tools.callFunction(' + |
| 782 | CKEDITOR.tools.addFunction( function() |
| 783 | { |
| 784 | var allInstances = CKEDITOR.instances, |
| 785 | editor, |
| 786 | doc; |
| 787 | for ( var i in allInstances ) |
| 788 | { |
| 789 | editor = allInstances[ i ]; |
| 790 | doc = editor.document; |
| 791 | if ( doc ) |
| 792 | { |
| 793 | doc.$.designMode = 'off'; |
| 794 | doc.$.designMode = 'on'; |
| 795 | } |
| 796 | } |
| 797 | } ) + ')' ); |
| 798 | } |
| 799 | } |
| 800 | } )(); |
| 801 | })(); |