Skip to content

Commit

Permalink
#5225 A SurveyJS Creator appears incorrectly when a parent container'…
Browse files Browse the repository at this point in the history
…s height is unspecified

Fixes #5225
  • Loading branch information
novikov82 committed Feb 27, 2024
1 parent fa64bc2 commit 5d856a7
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/survey-creator-core/src/components/question.scss
Original file line number Diff line number Diff line change
Expand Up @@ -758,15 +758,15 @@ svc-question,
.svc-carry-forward-panel {
margin-top: calcSize(2);
}
}

.sd-question__content {
.svc-question__content>.sd-question>.sd-question__content {
min-width: min(calcSize(8), 100%);
margin-left: calcSize(-5);
margin-right: calcSize(-5);
padding-left: calcSize(5);
padding-right: calcSize(5);
overflow-x: auto;
}
}

.svc-question__content--ranking {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions visualRegressionTests/tests/designer/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1921,4 +1921,48 @@ test("Check minimal height", async (t) => {
})();
await takeElementScreenshot("creator-min-height.png", root, t, comparer);
});
});

test("Composite question - no scroll", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await ClientFunction(() => {
window["Survey"].ComponentCollection.Instance.add({
name: "fullname",
title: "Full Name",
elementsJSON: [
{
type: "text",
name: "firstName",
title: "First Name",
isRequired: true,
minWidth: 200
},
{
type: "text",
name: "lastName",
title: "Last Name",
isRequired: true,
minWidth: 200,
startWithNewLine: false,
}
],
});
})();
await t.resizeWindow(1120, 900);
await setJSON({
"pages": [
{
"name": "page1",
"elements": [
{
"type": "fullname",
"name": "question1"
}
]
}
]
});
await t.hover(".sd-input.sd-text");
await takeElementScreenshot("composite-question-no-scroll.png", Selector(".svc-question__adorner"), t, comparer);
});
});

0 comments on commit 5d856a7

Please sign in to comment.