r80842 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80841‎ | r80842 | r80843 >
Date:02:58, 24 January 2011
Author:catrope
Status:ok
Tags:
Comment:
(bug 26827) Fix JS error on IE caused by the rename of {save,restore}StuffForIE() not updating callers. Changed callers to use {save,restore}Selection() or {save,restore}CursorAndScrollTop() as seemed appropriate
Modified paths:
  • /trunk/extensions/LiquidThreads/js/lqt.toolbar.js (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.textSelection.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.textSelection.js
@@ -91,7 +91,7 @@
9292 // IE
9393 $(this).focus();
9494 if ( context ) {
95 - context.fn.restoreStuffForIE();
 95+ context.fn.restoreCursorAndScrollTop();
9696 }
9797 var selText = $(this).textSelection( 'getSelection' );
9898 var scrollTop = this.scrollTop;
@@ -398,4 +398,4 @@
399399 context.fn.saveSelection();
400400 }
401401 return retval;
402 -};
\ No newline at end of file
 402+};
Index: trunk/extensions/LiquidThreads/js/lqt.toolbar.js
@@ -1339,7 +1339,7 @@
13401340 'wikieditor-toolbar-tool-link-cancel': function() {
13411341 // Clear any saved selection state
13421342 var context = $j(this).data( 'context' );
1343 - context.fn.restoreStuffForIE();
 1343+ context.fn.restoreSelection();
13441344 $j(this).dialog( 'close' );
13451345 }
13461346 },
@@ -1352,8 +1352,8 @@
13531353 // Pre-fill the text fields based on the current selection
13541354 var context = $j(this).data( 'context' );
13551355 // Restore and immediately save selection state, needed for inserting stuff later
1356 - context.fn.restoreStuffForIE();
1357 - context.fn.saveStuffForIE();
 1356+ context.fn.restoreSelection();
 1357+ context.fn.saveSelection();
13581358 var selection = context.$textarea.textSelection( 'getSelection' );
13591359 $j( '#wikieditor-toolbar-link-int-target' ).focus();
13601360 // Trigger the change event, so the link status indicator is up to date
@@ -1486,7 +1486,7 @@
14871487 'wikieditor-toolbar-tool-reference-cancel': function() {
14881488 // Clear any saved selection state
14891489 var context = $j( this ).data( 'context' );
1490 - context.fn.restoreStuffForIE();
 1490+ context.fn.restoreSelection();
14911491 $j( this ).dialog( 'close' );
14921492 }
14931493 },
@@ -1494,8 +1494,8 @@
14951495 // Pre-fill the text fields based on the current selection
14961496 var context = $j(this).data( 'context' );
14971497 // Restore and immediately save selection state, needed for inserting stuff later
1498 - context.fn.restoreStuffForIE();
1499 - context.fn.saveStuffForIE();
 1498+ context.fn.restoreSelection();
 1499+ context.fn.saveSelection();
15001500 var selection = context.$textarea.textSelection( 'getSelection' );
15011501 // set focus
15021502 $j( '#wikieditor-toolbar-reference-text' ).focus();

Follow-up revisions

RevisionCommit summaryAuthorDate
r810001.17: MFT r80576, r80583, r80656, r80842, r80900, r80913, r80918, r80919, r80...catrope22:49, 25 January 2011

Status & tagging log