r81648 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81647‎ | r81648 | r81649 >
Date:21:45, 7 February 2011
Author:brion
Status:resolved (Comments)
Tags:
Comment:
Fix for renamed stuff that broke jquery.textSelection.js: $.os.name -> $.client.platform
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.textSelection.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.textSelection.js
@@ -261,7 +261,7 @@
262262 */
263263 scrollToCaretPosition: function( options ) {
264264 function getLineLength( e ) {
265 - return Math.floor( e.scrollWidth / ( $.os.name == 'linux' ? 7 : 8 ) );
 265+ return Math.floor( e.scrollWidth / ( $.client.platform == 'linux' ? 7 : 8 ) );
266266 }
267267 function getCaretScrollPosition( e ) {
268268 // FIXME: This functions sucks and is off by a few lines most
@@ -304,7 +304,7 @@
305305 charInLine = caret - lastSpaceInLine;
306306 row++;
307307 }
308 - return ( $.os.name == 'mac' ? 13 : ( $.os.name == 'linux' ? 15 : 16 ) ) * row;
 308+ return ( $.client.platform == 'mac' ? 13 : ( $.client.platform == 'linux' ? 15 : 16 ) ) * row;
309309 }
310310 return this.each(function() {
311311 if ( $(this).is( ':hidden' ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r81651Followup r81491: use $.client correctlycatrope21:55, 7 February 2011
r816541.17: MFT r78372, r79324, r80841, r81430, r81488, r81496, r81554, r81561, r81...catrope22:28, 7 February 2011
r112909[Resources.php] Fix missing dependency on jquery.textSelection (follows-up r8...krinkle19:23, 2 March 2012

Comments

#Comment by Catrope (talk | contribs)   21:55, 7 February 2011

Use of $.client corrected in r81651

Status & tagging log