diff --git a/vendors/ckeditor-plugins/plain/plugin.js b/vendors/ckeditor-plugins/plain/plugin.js index 635779af0..6d37d0a78 100644 --- a/vendors/ckeditor-plugins/plain/plugin.js +++ b/vendors/ckeditor-plugins/plain/plugin.js @@ -6,7 +6,7 @@ if (!el) { return; } - if(end === undefined) { + if (end === undefined) { end = start; } if('selectionStart' in el) { @@ -22,6 +22,12 @@ range.select(); } }, + toTop = function (el) { + selectRange(el, 0); + if (el) { + el.scrollTop = 0; + } + }, simplePlainToHtml = function (sPlain) { return sPlain .replace(/&/g, '&') @@ -144,7 +150,7 @@ editor.focus(); if (editor.mode === 'plain') { - selectRange(editor.__textarea, 0); + toTop(editor.__textarea); } });