Editor-buttons not changing scrollbar
Posted: Tue Mar 17, 2009 11:41 pm
When using the non-wysiswygeditor there are these buttons injecting pieces of html-code. That's great, but it changes the position of the scrollbar of the editarea. That's kind of annoying when writing large entries.
This can be solved by changing the serendipity_editor.js:to It also refocus the textarea. Tested with Firefox 3 and Opera 9.63
sincerely
This can be solved by changing the serendipity_editor.js:
Code: Select all
function wrapSelection(txtarea, lft, rgt) {
if (document.all) {
IEWrap(txtarea, lft, rgt);
} else if (document.getElementById) {
mozWrap(txtarea, lft, rgt);
}
}Code: Select all
function wrapSelection(txtarea, lft, rgt) {
var scrollPos = txtarea.scrollTop;
if (document.all) {
IEWrap(txtarea, lft, rgt);
} else if (document.getElementById) {
mozWrap(txtarea, lft, rgt);
}
txtarea.focus();
txtarea.scrollTop = scrollPos;
}sincerely