From 723d7e3a61f277e89473e7c96acc3b01976847d1 Mon Sep 17 00:00:00 2001 From: tshenry Date: Wed, 22 Jul 2020 09:17:51 -0700 Subject: [PATCH] FEATURE: Submit post from mobile composer preview (#10286) --- .../javascripts/discourse/app/controllers/composer.js | 4 ++++ app/assets/stylesheets/mobile/compose.scss | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js index 042f6688142..42242dc83cd 100644 --- a/app/assets/javascripts/discourse/app/controllers/composer.js +++ b/app/assets/javascripts/discourse/app/controllers/composer.js @@ -616,6 +616,10 @@ export default Controller.extend({ this.set("model.isWarning", false); } + if (this.site.mobileView && this.showPreview) { + this.set("showPreview", false); + } + const composer = this.model; if (composer.cantSubmitPost) { diff --git a/app/assets/stylesheets/mobile/compose.scss b/app/assets/stylesheets/mobile/compose.scss index 7156baaac51..76d2634505e 100644 --- a/app/assets/stylesheets/mobile/compose.scss +++ b/app/assets/stylesheets/mobile/compose.scss @@ -122,6 +122,12 @@ } &.show-preview { + .submit-panel .save-or-cancel { + z-index: z("fullscreen") + 1; + .cancel { + display: none; + } + } .d-editor-preview-wrapper { position: fixed; z-index: z("fullscreen"); @@ -130,6 +136,7 @@ left: 0; right: 0; background-color: $secondary; + border-bottom: 40px solid $secondary; max-width: 100%; margin: 0; padding: 10px;