diff options
author | Robin Appelman <robin@icewind.nl> | 2018-04-12 12:03:52 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-08-15 21:42:08 +0300 |
commit | 0de2ef4959462dba43f673f8bf6a7d306f90674e (patch) | |
tree | 10ad922bd91ea7a5b9877bc344af207de9bd6fbe | |
parent | a0ae082cd03f99ce057d75b71ad9ba6a89c6645c (diff) |
trigger ace resize after toggling preview
Signed-off-by: Robin Appelman <robin@icewind.nl>
-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() { |