Quicktag scroll uber-fix for Moz from Alex
git-svn-id: http://svn.automattic.com/wordpress/trunk@1619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d2c63d853a
commit
718a91e5f0
|
@ -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