Quicktag scroll uber-fix for Moz from Alex

git-svn-id: https://develop.svn.wordpress.org/trunk@1619 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-09-08 05:49:35 +00:00
parent 4e7e0194b5
commit 69a6e252f7
1 changed files with 3 additions and 0 deletions

View File

@ -281,6 +281,8 @@ function edInsertTag(myField, i) {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
var cursorPos = endPos;
var scrollTop = myField.scrollTop;
if (startPos != endPos) {
myField.value = myField.value.substring(0, startPos)
+ edButtons[i].tagStart
@ -308,6 +310,7 @@ function edInsertTag(myField, i) {
myField.focus();
myField.selectionStart = cursorPos;
myField.selectionEnd = cursorPos;
myField.scrollTop = scrollTop;
}
else {
if (!edCheckOpenTags(i) || edButtons[i].tagEnd == '') {