Changeset 702 for trunk/forum/styles/subsilver2/template/editor.js
- Timestamp:
- Mar 31, 2010, 6:32:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/styles/subsilver2/template/editor.js
r400 r702 17 17 18 18 var baseHeight; 19 window.onload = initInsertions;20 19 21 20 /** … … 263 262 function mozWrap(txtarea, open, close) 264 263 { 265 var selLength = txtarea.textLength;264 var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength; 266 265 var selStart = txtarea.selectionStart; 267 266 var selEnd = txtarea.selectionEnd; … … 278 277 279 278 txtarea.value = s1 + open + s2 + close + s3; 280 txtarea.selectionStart = sel End + open.length + close.length;281 txtarea.selectionEnd = txtarea.selectionStart;279 txtarea.selectionStart = selStart + open.length; 280 txtarea.selectionEnd = selEnd + open.length; 282 281 txtarea.focus(); 283 282 txtarea.scrollTop = scrollTop;
Note:
See TracChangeset
for help on using the changeset viewer.