kopia lustrzana https://github.com/c9/core
Merge pull request +16007 from c9/ide-fix-tab-switch
fix issue with scroll position being reset on tab switchpull/483/merge
commit
5435753578
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -5541,9 +5541,12 @@ apf.AmlNode = function(){
|
||||||
nextNode = nextNode.nextSibling;
|
nextNode = nextNode.nextSibling;
|
||||||
}
|
}
|
||||||
|
|
||||||
amlNode.$pHtmlNode.insertBefore(amlNode.$altExt || amlNode.$ext,
|
var htmlNode = amlNode.$altExt || amlNode.$ext;
|
||||||
nextNode && (nextNode.$altExt || nextNode.$ext) || null);
|
var nextHtmlNode = nextNode && (nextNode.$altExt || nextNode.$ext) || null;
|
||||||
|
if (htmlNode.parentNode != amlNode.$pHtmlNode || amlNode.nextSibling != nextHtmlNode) {
|
||||||
|
|
||||||
|
amlNode.$pHtmlNode.insertBefore(htmlNode, nextHtmlNode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Signal node and all it's ancestors
|
//Signal node and all it's ancestors
|
||||||
|
|
Ładowanie…
Reference in New Issue