From 0b24c2929499f136a04a232a4714688977aa6e26 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 7 Feb 2011 21:55:11 +0000 Subject: [PATCH] Followup r81491: use $.client correctly --- resources/jquery/jquery.textSelection.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/jquery/jquery.textSelection.js b/resources/jquery/jquery.textSelection.js index 3207d981f4..6faeab8b31 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 / ( $.client.platform == 'linux' ? 7 : 8 ) ); + return Math.floor( e.scrollWidth / ( $.client.profile().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 ( $.client.platform == 'mac' ? 13 : ( $.client.platform == 'linux' ? 15 : 16 ) ) * row; + return ( $.client.profile().platform == 'mac' ? 13 : ( $.client.profile().platform == 'linux' ? 15 : 16 ) ) * row; } return this.each(function() { if ( $(this).is( ':hidden' ) ) { @@ -400,4 +400,4 @@ scrollToCaretPosition: function( options ) { } return retval; }; -} )( jQuery ); \ No newline at end of file +} )( jQuery ); -- 2.20.1