Skip to content

Commit 39ddb49

Browse files
committed
Fix Start reply at top of email (close RainLoop#865)
1 parent 33a9234 commit 39ddb49

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

vendors/ckeditor-plugins/plain/plugin.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
if (!el) {
77
return;
88
}
9-
if(end === undefined) {
9+
if (end === undefined) {
1010
end = start;
1111
}
1212
if('selectionStart' in el) {
@@ -22,6 +22,12 @@
2222
range.select();
2323
}
2424
},
25+
toTop = function (el) {
26+
selectRange(el, 0);
27+
if (el) {
28+
el.scrollTop = 0;
29+
}
30+
},
2531
simplePlainToHtml = function (sPlain) {
2632
return sPlain
2733
.replace(/&/g, '&')
@@ -144,7 +150,7 @@
144150
editor.focus();
145151

146152
if (editor.mode === 'plain') {
147-
selectRange(editor.__textarea, 0);
153+
toTop(editor.__textarea);
148154
}
149155
});
150156

0 commit comments

Comments
 (0)