fix scrolltop being changed after moving the tab between panes

pull/483/merge
nightwing 2018-03-05 20:35:15 +04:00
rodzic 8ad52f1756
commit 8605bafc84
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -30,6 +30,7 @@ define(function(require, module, exports) {
// Old Editor // Old Editor
var lastEditor = doc.editor; var lastEditor = doc.editor;
if (lastEditor && lastEditor != plugin) { if (lastEditor && lastEditor != plugin) {
doc.getState();
lastEditor.unloadDocument(doc, { lastEditor.unloadDocument(doc, {
toEditor: plugin, toEditor: plugin,
fromEditor: lastEditor fromEditor: lastEditor

Wyświetl plik

@ -49,13 +49,13 @@ define(function(require, exports, module) {
// Value // Value
doc.on("getValue", function get(e) { doc.on("getValue", function get(e) {
return currentDocument == doc return currentDocument == doc && editor
? editor.value ? editor.value
: e.value; : e.value;
}, session); }, session);
doc.on("setValue", function set(e) { doc.on("setValue", function set(e) {
if (currentDocument == doc) if (currentDocument == doc && editor)
editor.value = e.value || ""; editor.value = e.value || "";
}, session); }, session);