1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

insert_text now working properly in IE for smilies again

git-svn-id: file:///svn/phpbb/trunk@6624 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Dominik Dröscher 2006-11-21 06:39:50 +00:00
parent 2c8cae5226
commit 3a85729945

View File

@ -134,7 +134,7 @@ function insert_text(text, spaces, popup)
{
text = ' ' + text + ' ';
}
if (textarea.createTextRange && !isNaN(textarea.caretPos))
if (textarea.createTextRange && textarea.caretPos)
{
var caret_pos = textarea.caretPos;
caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;