Fix: loadContent — принудительное обновление TextArea (очистка + установка + cursorPosition); убран debug-консоль из loadContent
This commit is contained in:
@@ -266,13 +266,13 @@ Item {
|
|||||||
|
|
||||||
// ---------- Просмотр (режим просмотра) ----------
|
// ---------- Просмотр (режим просмотра) ----------
|
||||||
function loadContent() {
|
function loadContent() {
|
||||||
console.log("loadContent called: docIndex=" + pane.docIndex + " editMode=" + pane.editMode)
|
|
||||||
if (pane.docIndex >= 0) {
|
if (pane.docIndex >= 0) {
|
||||||
const c = documentManager.contentAt(pane.docIndex)
|
const c = documentManager.contentAt(pane.docIndex)
|
||||||
console.log("loadContent content=" + c.substring(0, 50) + "...")
|
// Принудительное обновление TextArea: сначала очищаем, затем ставим контент
|
||||||
|
editor.text = ""
|
||||||
editor.text = c
|
editor.text = c
|
||||||
|
editor.cursorPosition = c.length
|
||||||
pane.editorContent = c
|
pane.editorContent = c
|
||||||
console.log("loadContent editor.text.length=" + editor.text.length)
|
|
||||||
} else {
|
} else {
|
||||||
editor.text = ""
|
editor.text = ""
|
||||||
pane.editorContent = ""
|
pane.editorContent = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user