From 009347f298d898bc86610db3cfb1cf48647fa08c Mon Sep 17 00:00:00 2001 From: giuliana Date: Fri, 10 Nov 2023 08:09:31 +0000 Subject: [PATCH] Fix SetDeviceBreakpoints behavior --- dist/OutSystemsUI.css | 12 ++++++------ dist/OutSystemsUI.js | 6 ++---- src/scripts/OutSystems/OSUI/Utils/DeviceDetection.ts | 8 ++------ 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dist/OutSystemsUI.css b/dist/OutSystemsUI.css index 705ff21677..d82619523d 100644 --- a/dist/OutSystemsUI.css +++ b/dist/OutSystemsUI.css @@ -8508,10 +8508,10 @@ span.flatpickr-weekday{ color:var(--color-neutral-6); pointer-events:none; } -.osui-datepicker input.flatpickr-input:first-of-type{ +.osui-datepicker input:first-of-type{ display:none; } -.osui-datepicker input.flatpickr-input:first-of-type{ +.osui-datepicker input:first-of-type{ -servicestudio-display:inline-flex !important; } .osui-datepicker-calendar-ss-preview{ @@ -9599,10 +9599,10 @@ body.vscomp-popup-active .vscomp-wrapper{ color:var(--color-neutral-6); pointer-events:none; } -.osui-monthpicker input.flatpickr-input:first-of-type{ +.osui-monthpicker input:first-of-type{ display:none; } -.osui-monthpicker input.flatpickr-input:first-of-type{ +.osui-monthpicker input:first-of-type{ -servicestudio-display:inline-flex !important; } .form .osui-monthpicker-ss-preview{ @@ -10465,10 +10465,10 @@ body.vscomp-popup-active .vscomp-wrapper{ color:var(--color-neutral-6); pointer-events:none; } -.osui-timepicker input.flatpickr-input:first-of-type{ +.osui-timepicker input[type=time]:first-of-type{ display:none; } -.osui-timepicker input.flatpickr-input:first-of-type{ +.osui-timepicker input[type=time]:first-of-type{ -servicestudio-display:inline-flex !important; } .osui-timepicker__dropdown-ss-preview{ diff --git a/dist/OutSystemsUI.js b/dist/OutSystemsUI.js index 703d74e9e1..ef7adeef4b 100644 --- a/dist/OutSystemsUI.js +++ b/dist/OutSystemsUI.js @@ -16110,7 +16110,6 @@ var OutSystems; const orient = windowWidth > windowHeight ? OSFramework.OSUI.GlobalEnum.DeviceOrientation.landscape : OSFramework.OSUI.GlobalEnum.DeviceOrientation.portrait; - const isLandscape = orient === OSFramework.OSUI.GlobalEnum.DeviceOrientation.landscape; const userValues = { phone: phoneWidth, tablet: tabletWidth, @@ -16123,11 +16122,10 @@ var OutSystems; OSFramework.OSUI.GlobalEnum.DeviceType.desktop, ]; let device; - const windowSize = isLandscape ? windowWidth : windowHeight; - if (windowSize <= phoneMax) { + if (windowWidth <= phoneMax) { device = 0; } - else if (windowSize <= tabletMax) { + else if (windowWidth <= tabletMax) { device = 1; } else { diff --git a/src/scripts/OutSystems/OSUI/Utils/DeviceDetection.ts b/src/scripts/OutSystems/OSUI/Utils/DeviceDetection.ts index 9f61695fc0..4b869557ea 100644 --- a/src/scripts/OutSystems/OSUI/Utils/DeviceDetection.ts +++ b/src/scripts/OutSystems/OSUI/Utils/DeviceDetection.ts @@ -149,7 +149,6 @@ namespace OutSystems.OSUI.Utils.DeviceDetection { windowWidth > windowHeight ? OSFramework.OSUI.GlobalEnum.DeviceOrientation.landscape : OSFramework.OSUI.GlobalEnum.DeviceOrientation.portrait; - const isLandscape = orient === OSFramework.OSUI.GlobalEnum.DeviceOrientation.landscape; const userValues = { phone: phoneWidth, @@ -167,13 +166,10 @@ namespace OutSystems.OSUI.Utils.DeviceDetection { let device; - // To set the device using the window dimensions, we just need to look into the largest dimension - const windowSize = isLandscape ? windowWidth : windowHeight; - - if (windowSize <= phoneMax) { + if (windowWidth <= phoneMax) { //Is phone! device = 0; - } else if (windowSize <= tabletMax) { + } else if (windowWidth <= tabletMax) { //Is Tablet! device = 1; } else {