From 314b39dd1c65e321920fdc095915c2954a53b944 Mon Sep 17 00:00:00 2001 From: smizrahi Date: Wed, 22 May 2024 10:35:16 +0200 Subject: [PATCH] fix(ui): Fix invalid display when creating new appointment / mail on mobile. Initialize isFullscreen to if screen is in portrait. Fixes #5970. --- UI/WebServerResources/js/Mailer/MessageEditorController.js | 2 +- UI/WebServerResources/js/Scheduler/ComponentController.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/WebServerResources/js/Mailer/MessageEditorController.js b/UI/WebServerResources/js/Mailer/MessageEditorController.js index a7daf907b..39cee94b8 100644 --- a/UI/WebServerResources/js/Mailer/MessageEditorController.js +++ b/UI/WebServerResources/js/Mailer/MessageEditorController.js @@ -16,7 +16,7 @@ this.account = stateAccount; this.autocomplete = {to: {}, cc: {}, bcc: {}}; this.autosave = null; - this.isFullscreen = false; + this.isFullscreen = (typeof screen.orientation !== 'undefined' && screen.orientation && 'portrait-primary' == screen.orientation.type); this.hideBcc = (stateMessage.editable.bcc.length === 0); this.hideCc = (stateMessage.editable.cc.length === 0); this.identities = stateAccount.identities; diff --git a/UI/WebServerResources/js/Scheduler/ComponentController.js b/UI/WebServerResources/js/Scheduler/ComponentController.js index 3f5e9c861..6071511ae 100644 --- a/UI/WebServerResources/js/Scheduler/ComponentController.js +++ b/UI/WebServerResources/js/Scheduler/ComponentController.js @@ -230,7 +230,7 @@ this.categories = {}; this.showRecurrenceEditor = this.component.$hasCustomRepeat; this.showAttendeesEditor = this.component.attendees && this.component.attendees.length; - this.isFullscreen = false; + this.isFullscreen = (typeof screen.orientation !== 'undefined' && screen.orientation && 'portrait-primary' == screen.orientation.type); this.originalModalCancel = $mdDialog.cancel; if (this.component.type == 'appointment') {