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) {