diff --git a/src/public/app/widgets/type_widgets/editable_code.js b/src/public/app/widgets/type_widgets/editable_code.js index 452fbbf9b..a62f3fafb 100644 --- a/src/public/app/widgets/type_widgets/editable_code.js +++ b/src/public/app/widgets/type_widgets/editable_code.js @@ -25,6 +25,7 @@ export default class EditableCodeTypeWidget extends AbstractCodeTypeWidget { doRender() { this.$widget = $(TPL); + this.contentSized(); this.$editor = this.$widget.find('.note-detail-code-editor'); keyboardActionService.setupActionsForElement('code-detail', this.$widget, this); diff --git a/src/public/app/widgets/type_widgets/read_only_code.js b/src/public/app/widgets/type_widgets/read_only_code.js index 4cc2fb5e1..72e2e05e5 100644 --- a/src/public/app/widgets/type_widgets/read_only_code.js +++ b/src/public/app/widgets/type_widgets/read_only_code.js @@ -21,6 +21,7 @@ export default class ReadOnlyCodeTypeWidget extends AbstractCodeTypeWidget { doRender() { this.$widget = $(TPL); + this.contentSized(); this.$editor = this.$widget.find('.note-detail-readonly-code-content'); super.doRender();