kopia lustrzana https://github.com/c9/core
fix scrolltop being changed after moving the tab between panes
rodzic
8ad52f1756
commit
8605bafc84
|
@ -30,6 +30,7 @@ define(function(require, module, exports) {
|
|||
// Old Editor
|
||||
var lastEditor = doc.editor;
|
||||
if (lastEditor && lastEditor != plugin) {
|
||||
doc.getState();
|
||||
lastEditor.unloadDocument(doc, {
|
||||
toEditor: plugin,
|
||||
fromEditor: lastEditor
|
||||
|
|
|
@ -49,13 +49,13 @@ define(function(require, exports, module) {
|
|||
|
||||
// Value
|
||||
doc.on("getValue", function get(e) {
|
||||
return currentDocument == doc
|
||||
return currentDocument == doc && editor
|
||||
? editor.value
|
||||
: e.value;
|
||||
}, session);
|
||||
|
||||
doc.on("setValue", function set(e) {
|
||||
if (currentDocument == doc)
|
||||
if (currentDocument == doc && editor)
|
||||
editor.value = e.value || "";
|
||||
}, session);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue