diff --git a/ayanova/src/views/ay-report-edit.vue b/ayanova/src/views/ay-report-edit.vue
index ca02ef4f..d1d5454d 100644
--- a/ayanova/src/views/ay-report-edit.vue
+++ b/ayanova/src/views/ay-report-edit.vue
@@ -6,7 +6,7 @@
{{ $ay.t("ReportEditorMobileWarning") }}
-
+
{
- editor.layout();
- editor.focus();
- });
-
break;
case "style":
editor.setModel(vm.editData.style.model);
editor.restoreViewState(vm.editData.style.state);
editor.updateOptions({ readOnly: false });
vm.view = "edit";
- editor.layout();
- editor.focus();
break;
case "jsPrerender":
editor.setModel(vm.editData.jsPrerender.model);
editor.restoreViewState(vm.editData.jsPrerender.state);
editor.updateOptions({ readOnly: false });
vm.view = "edit";
- editor.layout();
- editor.focus();
break;
case "jsHelpers":
editor.setModel(vm.editData.jsHelpers.model);
editor.restoreViewState(vm.editData.jsHelpers.state);
editor.updateOptions({ readOnly: false });
vm.view = "edit";
- editor.layout();
- editor.focus();
break;
case "rawData":
editor.setModel(vm.editData.rawData.model);
editor.restoreViewState(vm.editData.rawData.state);
editor.updateOptions({ readOnly: true });
vm.view = "edit";
- editor.layout();
- editor.focus();
break;
}
- vm.lastTab = vm.activeTab;
+ vm.$nextTick(() => {
+ editor.layout();
+ editor.focus();
+ });
+ // vm.lastTab = vm.activeTab;
},
onResize() {
- //resize related links:
- //https://github.com/Microsoft/monaco-editor/issues/28
- let el = document.getElementById("editContainer");
- el.style = `width:100%;height:${window.innerHeight * 0.77}px`;
- if (editor != null) {
- editor.layout();
- }
+ this.$nextTick(() => {
+ //resize related links:
+ //https://github.com/Microsoft/monaco-editor/issues/28
+ let el = document.getElementById("editContainer");
+ el.style = `width:100%;height:${window.innerHeight * 0.77}px`;
+ if (editor != null) {
+ editor.layout();
+ }
+ });
},
canSave: function() {
return this.formState.valid && this.formState.dirty;