Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -675,10 +675,15 @@ |
676 | 676 | 'overflow-x': 'hidden' |
677 | 677 | } ) |
678 | 678 | .insertAfter( context.$textarea ) |
679 | | - .load( function() { |
680 | | - if ( !context.$iframe[0].contentWindow.document.body ) { |
681 | | - return; |
| 679 | + .load( function() { |
| 680 | + //IE8 runs this twice, the second time is valid |
| 681 | + if( $.browser.msie && $.browser.version >= 8 ) { |
| 682 | + if(!this.isSecondRun){ |
| 683 | + this.isSecondRun = true; |
| 684 | + return; |
| 685 | + } |
682 | 686 | } |
| 687 | + |
683 | 688 | // Turn the document's design mode on |
684 | 689 | context.$iframe[0].contentWindow.document.designMode = 'on'; |
685 | 690 | // Get a reference to the content area of the iframe |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.highlight.js |
— | — | @@ -52,15 +52,8 @@ |
53 | 53 | } ) ); |
54 | 54 | */ |
55 | 55 | // Highlight stuff for the first time |
| 56 | + |
56 | 57 | |
57 | | - //IE8 runs this twice, the second time is valid |
58 | | - if( $.browser.msie && $.browser.version >= 8 ) { |
59 | | - if(!this.isSecondRun){ |
60 | | - this.isSecondRun = true; |
61 | | - return; |
62 | | - } |
63 | | - } |
64 | | - |
65 | 58 | $.wikiEditor.modules.highlight.fn.scan( context, "" ); |
66 | 59 | $.wikiEditor.modules.highlight.fn.mark( context, "", "" ); |
67 | 60 | } |