[Phpfreechat-svn] SF.net SVN: phpfreechat: [1119] trunk/data/public/js/pfcclient.js
Status: Beta
Brought to you by:
kerphi
From: <gpi...@us...> - 2007-08-13 17:08:33
|
Revision: 1119 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1119&view=rev Author: gpinzone Date: 2007-08-13 10:08:34 -0700 (Mon, 13 Aug 2007) Log Message: ----------- Simplified caret position update on smiley insert for IE. Modified Paths: -------------- trunk/data/public/js/pfcclient.js Modified: trunk/data/public/js/pfcclient.js =================================================================== --- trunk/data/public/js/pfcclient.js 2007-08-13 15:06:14 UTC (rev 1118) +++ trunk/data/public/js/pfcclient.js 2007-08-13 17:08:34 UTC (rev 1119) @@ -1097,14 +1097,10 @@ //document.selection.createRange().text = smiley; range.text = smiley; + // Increment caret position. // Check if internally kept values for selection are initialized. - if (w.selStart && w.selEnd) - { - w.selStart += smiley.length; - w.selEnd = w.selStart; - } - else - this.storeSelectionPos(); + w.selStart = (w.selStart) ? w.selStart + smiley.length : smiley.length; + w.selEnd = w.selStart; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |