r82947 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82946‎ | r82947 | r82948 >
Date:18:42, 28 February 2011
Author:catrope
Status:ok
Tags:
Comment:
Narayam: Followup r82890: fix whitespace, rephrase comment
Modified paths:
  • /trunk/extensions/Narayam/ext.narayam.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/ext.narayam.core.js
@@ -155,13 +155,12 @@
156156
157157 var $this = $( this );
158158 var c = String.fromCharCode( e.which );
159 - // Get current caret position
160 - // User may select text to overwrite
161 - // Get start and end position of selection
162 - // In case if user do no selection, both startPos and endPos will be same
 159+ // Get the current caret position. The user may have selected text to overwrite,
 160+ // so get both the start and end position of the selection. If there is no selection,
 161+ // startPos and endPos will be equal.
163162 var pos = $this.textSelection( 'getCaretPosition', { 'startAndEnd': true } );
164 - var startPos = pos[0];
165 - var endPos = pos[1];
 163+ var startPos = pos[0];
 164+ var endPos = pos[1];
166165 // Get the last few characters before the one the user just typed,
167166 // to provide context for the transliteration regexes.
168167 // We need to append c because it hasn't been added to $this.val() yet

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82890Fix issue found myself on testing: text overwrite was not possible.junaidpv13:41, 27 February 2011

Status & tagging log