r63475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63474‎ | r63475 | r63476 >
Date:17:31, 9 March 2010
Author:pdhanda
Status:deferred (Comments)
Tags:
Comment:
fixed issue they attempted to rewrite it is Java when Java was hot
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -384,10 +384,10 @@
385385 //surround by <p> if it does not already have it
386386 var t = context.fn.getOffset();
387387 if ( t.node.parentNode.nodeName.toLowerCase() == 'body' ) {
388 - var cursorPos = context.fn.getCaretPosition()[0];
 388+ var cursorPos = context.fn.getCaretPosition();
389389 $( t.node ).wrap( "<p></p>" );
390 - context.fn.refreshOffsets();
391 - context.fn.setSelection( { start: cursorPos, end: cursorPos } );
 390+ context.fn.purgeOffsets();
 391+ context.fn.setSelection( { start: cursorPos[0], end: cursorPos[1] } );
392392 }
393393
394394

Comments

#Comment by Pdhanda (talk | contribs)   17:35, 9 March 2010

That commit message should have been "Fixed from feedback for r63455"

#Comment by Catrope (talk | contribs)   21:02, 9 March 2010

After changing JS files, please rebuild the .combined.js and .combined.min.js files (there's a Makefile for this, just run make in the UsabilityInitiative dir) and update the style versions for the changed files (including combined/minified files) in UsabilityInitiative.hooks.php, Vector/Vector.hooks.php and/or WikiEditor/WikiEditor.hooks.php.

Status & tagging log