From a294294bb161fd786c467f5995da484d5d1f674a Mon Sep 17 00:00:00 2001 From: Georgi Minkov Date: Fri, 30 Oct 2020 15:06:16 +0200 Subject: [PATCH] fix(ui5-dialog): no longer gets clipped in short screen height in IE Fixes: #2243 --- packages/main/src/Dialog.js | 4 ++++ packages/main/src/Popup.js | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/main/src/Dialog.js b/packages/main/src/Dialog.js index 3a4e05adc45e..9a26b8cd907d 100644 --- a/packages/main/src/Dialog.js +++ b/packages/main/src/Dialog.js @@ -182,6 +182,10 @@ class Dialog extends Popup { return true; } + get _displayProp() { + return "flex"; + } + get classes() { return { root: { diff --git a/packages/main/src/Popup.js b/packages/main/src/Popup.js index 716d1c0d184c..9453a5b7fed5 100644 --- a/packages/main/src/Popup.js +++ b/packages/main/src/Popup.js @@ -204,6 +204,10 @@ class Popup extends UI5Element { return staticAreaStyles; } + get _displayProp() { + return "block"; + } + /** * Prevents the user from interacting with the content under the block layer */ @@ -393,11 +397,11 @@ class Popup extends UI5Element { } /** - * Sets "block" display to the popup + * Sets "block" display to the popup. The property can be overriden by derivatives of Popup. * @protected */ show() { - this.style.display = "block"; + this.style.display = this._displayProp; } @@ -417,7 +421,7 @@ class Popup extends UI5Element { } /** - * Implement this getter with relevant logic regarding the modality of the popup (f.e. based on a public property) + * Implement this getter with relevant logic regarding the modality of the popup (e.g. based on a public property) * * @protected * @abstract