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
|
// 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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue