diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-08-15 21:50:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-15 21:50:47 +0300 |
commit | cfa393018075029e9486bda604456acee0b6c45f (patch) | |
tree | 10ad922bd91ea7a5b9877bc344af207de9bd6fbe | |
parent | a0ae082cd03f99ce057d75b71ad9ba6a89c6645c (diff) | |
parent | 0de2ef4959462dba43f673f8bf6a7d306f90674e (diff) |
Merge pull request #96 from nextcloud/editor-preview-resizev14.0.0beta4v14.0.0RC1
trigger ace resize after toggling preview
-rw-r--r-- | js/editor.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/editor.js b/js/editor.js index badf1c2..98a2dfc 100644 --- a/js/editor.js +++ b/js/editor.js @@ -317,7 +317,9 @@ var Files_Texteditor = { },200); var text = window.aceEditor.getSession().getValue(); _self.previewPluginOnChange(text, _self.preview); - window.aceEditor.resize(); + setTimeout(function() { + window.aceEditor.resize(); + }, 500); _self.loadPreviewControlBar(); } else { _self.previewPluginOnChange = null; @@ -375,6 +377,9 @@ var Files_Texteditor = { container.find('#editor_container').addClass('onlyPreview'); break; } + setTimeout(function() { + window.aceEditor.resize(); + }, 500); }, loadPreviewControlBar: function() { |