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:
parent
4e7e0194b5
commit
69a6e252f7
@ -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 == '') {
|
||||
|
Loading…
Reference in New Issue
Block a user