diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-11-23 02:20:23 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-11-23 02:20:23 +0300 |
commit | 880c9a2c7860001f22a181ed36f559b62341e148 (patch) | |
tree | 26f66dce89e4ca9ed273779b8c4f29755f55178a /app/assets/javascripts/zen_mode.js | |
parent | 9fefb6c2be1e9772599aa376ae8ae37241ace0c6 (diff) |
Backport fix epic fullscreen
Diffstat (limited to 'app/assets/javascripts/zen_mode.js')
-rw-r--r-- | app/assets/javascripts/zen_mode.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/zen_mode.js b/app/assets/javascripts/zen_mode.js index cba7b9227cd..06a86f3b94a 100644 --- a/app/assets/javascripts/zen_mode.js +++ b/app/assets/javascripts/zen_mode.js @@ -71,7 +71,7 @@ export default class ZenMode { this.active_textarea = this.active_backdrop.find('textarea'); // Prevent a user-resized textarea from persisting to fullscreen this.active_textarea.removeAttr('style'); - return this.active_textarea.focus(); + this.active_textarea.focus(); } exit() { @@ -81,7 +81,11 @@ export default class ZenMode { this.scrollTo(this.active_textarea); this.active_textarea = null; this.active_backdrop = null; - return Dropzone.forElement('.div-dropzone').enable(); + + const $dropzone = $('.div-dropzone'); + if ($dropzone && !$dropzone.hasClass('js-invalid-dropzone')) { + Dropzone.forElement('.div-dropzone').enable(); + } } } |