From d8b39ef3f6ce6b4dc76d667aedd56c64aaa5dbbc Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 7 Feb 2011 21:45:19 +0000 Subject: [PATCH] Fix for renamed stuff that broke jquery.textSelection.js: $.os.name -> $.client.platform --- resources/jquery/jquery.textSelection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/jquery/jquery.textSelection.js b/resources/jquery/jquery.textSelection.js index f31a1a7b55..3207d981f4 100644 --- a/resources/jquery/jquery.textSelection.js +++ b/resources/jquery/jquery.textSelection.js @@ -261,7 +261,7 @@ setSelection: function( options ) { */ scrollToCaretPosition: function( options ) { function getLineLength( e ) { - return Math.floor( e.scrollWidth / ( $.os.name == 'linux' ? 7 : 8 ) ); + return Math.floor( e.scrollWidth / ( $.client.platform == 'linux' ? 7 : 8 ) ); } function getCaretScrollPosition( e ) { // FIXME: This functions sucks and is off by a few lines most @@ -304,7 +304,7 @@ scrollToCaretPosition: function( options ) { charInLine = caret - lastSpaceInLine; row++; } - return ( $.os.name == 'mac' ? 13 : ( $.os.name == 'linux' ? 15 : 16 ) ) * row; + return ( $.client.platform == 'mac' ? 13 : ( $.client.platform == 'linux' ? 15 : 16 ) ) * row; } return this.each(function() { if ( $(this).is( ':hidden' ) ) { -- 2.20.1