r61033 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61032‎ | r61033 | r61034 >
Date:22:57, 13 January 2010
Author:nimishg
Status:ok
Tags:
Comment:
Moved IE fix
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.highlight.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -675,10 +675,15 @@
676676 'overflow-x': 'hidden'
677677 } )
678678 .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+ }
682686 }
 687+
683688 // Turn the document's design mode on
684689 context.$iframe[0].contentWindow.document.designMode = 'on';
685690 // Get a reference to the content area of the iframe
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.highlight.js
@@ -52,15 +52,8 @@
5353 } ) );
5454 */
5555 // Highlight stuff for the first time
 56+
5657
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 -
6558 $.wikiEditor.modules.highlight.fn.scan( context, "" );
6659 $.wikiEditor.modules.highlight.fn.mark( context, "", "" );
6760 }

Status & tagging log