From: Brion Vibber Date: Mon, 7 Feb 2011 21:45:19 +0000 (+0000) Subject: Fix for renamed stuff that broke jquery.textSelection.js: $.os.name -> $.client.platform X-Git-Tag: 1.31.0-rc.0~32136 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=d8b39ef3f6ce6b4dc76d667aedd56c64aaa5dbbc;p=lhc%2Fweb%2Fwiklou.git Fix for renamed stuff that broke jquery.textSelection.js: $.os.name -> $.client.platform --- 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' ) ) {