diff --git a/packages/survey-core/src/actions/adaptive-container.ts b/packages/survey-core/src/actions/adaptive-container.ts index dfce6891a0..dbb05bd665 100644 --- a/packages/survey-core/src/actions/adaptive-container.ts +++ b/packages/survey-core/src/actions/adaptive-container.ts @@ -152,8 +152,11 @@ export class AdaptiveActionContainer extends ActionCo } public setActionsMode(mode: actionModeType) { this.actions.forEach((action) => { - if(mode == "small" && action.disableShrink) return; - action.mode = mode; + if(mode == "small" && action.disableShrink) { + action.mode = "large"; + } else { + action.mode = mode; + } }); } public dispose(): void { diff --git a/packages/survey-core/tests/responsivityTests.ts b/packages/survey-core/tests/responsivityTests.ts index ed3d686050..16276dcf2f 100644 --- a/packages/survey-core/tests/responsivityTests.ts +++ b/packages/survey-core/tests/responsivityTests.ts @@ -593,4 +593,21 @@ QUnit.test("check title change calls raise update", function (assert) { assert.equal(log, "->called: true->called: true", "called from title change"); item1.title = "Test"; assert.equal(log, "->called: true->called: true"); +}); + +QUnit.test("check actions mode is set correctly when disableShrink is set", function (assert) { + const model: AdaptiveActionContainer = new AdaptiveActionContainer(); + const action = model.addAction({ + disableShrink: true, + title: "test" + }); + assert.equal(action.mode, "large"); + model.setActionsMode("removed"); + assert.equal(action.mode, "removed"); + model.setActionsMode("large"); + assert.equal(action.mode, "large"); + model.setActionsMode("popup"); + assert.equal(action.mode, "popup"); + model.setActionsMode("small"); + assert.equal(action.mode, "large"); }); \ No newline at end of file