diff --git a/client/src/vue_components/show/config/cues/CueEditor.vue b/client/src/vue_components/show/config/cues/CueEditor.vue index 3aaf2cab..4bb7cab2 100644 --- a/client/src/vue_components/show/config/cues/CueEditor.vue +++ b/client/src/vue_components/show/config/cues/CueEditor.vue @@ -254,9 +254,14 @@ export default { DATA: {}, }); }, - decrPage() { + async decrPage() { if (this.currentEditPage > 1) { + const targetPage = this.currentEditPage - 1; + // Load target page from backend + await this.LOAD_SCRIPT_PAGE(targetPage); this.currentEditPage--; + // Pre-load previous page + await this.LOAD_SCRIPT_PAGE(this.currentEditPage - 1); } }, async incrPage() { diff --git a/client/src/vue_components/show/config/script/ScriptEditor.vue b/client/src/vue_components/show/config/script/ScriptEditor.vue index 4ee4b980..29d11371 100644 --- a/client/src/vue_components/show/config/script/ScriptEditor.vue +++ b/client/src/vue_components/show/config/script/ScriptEditor.vue @@ -533,8 +533,11 @@ export default { }, async decrPage() { if (this.currentEditPage > 1) { - if (!Object.keys(this.TMP_SCRIPT).includes((this.currentEditPage - 1).toString())) { - this.ADD_BLANK_PAGE(this.currentEditPage - 1); + const targetPage = this.currentEditPage - 1; + // Load from backend if not in buffer + if (!Object.keys(this.TMP_SCRIPT).includes(targetPage.toString())) { + await this.LOAD_SCRIPT_PAGE(targetPage); + this.ADD_BLANK_PAGE(targetPage); } if (this.TMP_SCRIPT[this.currentEditPageKey].length === 0) { this.REMOVE_PAGE(this.currentEditPage);