diff options
Diffstat (limited to 'phpBB/styles/subsilver2/template/editor.js')
-rw-r--r-- | phpBB/styles/subsilver2/template/editor.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js index b4a426df4e..2d157caada 100644 --- a/phpBB/styles/subsilver2/template/editor.js +++ b/phpBB/styles/subsilver2/template/editor.js @@ -156,7 +156,7 @@ function insert_text(text, spaces, popup) var sel_start = textarea.selectionStart; var sel_end = textarea.selectionEnd; - mozWrap(textarea, text, '') + mozWrap(textarea, text, ''); textarea.selectionStart = sel_start + text.length; textarea.selectionEnd = sel_end + text.length; } @@ -272,12 +272,12 @@ function mozWrap(txtarea, open, close) } var s1 = (txtarea.value).substring(0,selStart); - var s2 = (txtarea.value).substring(selStart, selEnd) + var s2 = (txtarea.value).substring(selStart, selEnd); var s3 = (txtarea.value).substring(selEnd, selLength); txtarea.value = s1 + open + s2 + close + s3; - txtarea.selectionStart = selEnd + open.length + close.length; - txtarea.selectionEnd = txtarea.selectionStart; + txtarea.selectionStart = selStart + open.length; + txtarea.selectionEnd = selEnd + open.length; txtarea.focus(); txtarea.scrollTop = scrollTop; |