From b8c3d149f1f1075054d6adb3118f78f1f80bf7dd Mon Sep 17 00:00:00 2001 From: Aleksey Novikov Date: Thu, 7 Sep 2023 16:30:29 +0300 Subject: [PATCH] #6877 Mobile: Do not use min size for mobiles - use css min Fixes #6877 --- src/survey-element.ts | 2 +- tests/surveyElementTests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/survey-element.ts b/src/survey-element.ts index 5f9d041eda..dcfcfafa7a 100644 --- a/src/survey-element.ts +++ b/src/survey-element.ts @@ -916,7 +916,7 @@ export class SurveyElement extends SurveyElementCore implements ISurvey style["flexGrow"] = 1; style["flexShrink"] = 1; style["flexBasis"] = this.renderWidth; - style["minWidth"] = this.renderMinWidth ? this.minWidth : ""; + style["minWidth"] = this.renderMinWidth ? this.minWidth : "min(100%, " + this.minWidth + ")"; style["maxWidth"] = this.maxWidth; } return style; diff --git a/tests/surveyElementTests.ts b/tests/surveyElementTests.ts index 2a560414bd..b549d333ef 100644 --- a/tests/surveyElementTests.ts +++ b/tests/surveyElementTests.ts @@ -261,7 +261,7 @@ QUnit.test("rootStyle on mobile", function (assert) { "flexGrow": 1, "flexShrink": 1, "maxWidth": "100%", - "minWidth": "" + "minWidth": "min(100%, 300px)" }); }); QUnit.test("question.errorLocation", function (assert) {