Skip to content

Commit

Permalink
Merge pull request #7767 from surveyjs/bug/7755-panel-dynamic-comment…
Browse files Browse the repository at this point in the history
…-padding

Fixed #7755 - Dynamic Panel with the Comment Area - The Other box is rendered incorrectly
  • Loading branch information
andrewtelnov authored Jan 30, 2024
2 parents 4845816 + a6adb61 commit 7b0ccb8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/defaultV2-theme/blocks/sd-paneldynamic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@
}
}

.sd-question--paneldynamic:not(.sd-question--empty) {
&>.sd-question__content {
&>.sd-question__comment-area {
padding-bottom: var(--sd-base-padding);
}
}
}

.sd-paneldynamic__buttons-container .sd-action-bar {
width: 100%;
margin: 0 calcSize(-3);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions visualRegressionTests/tests/defaultV2/paneldynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,4 +458,36 @@ frameworks.forEach(framework => {
await takeElementScreenshot("paneldynamic-focused-tab", Selector(".sd-question--paneldynamic"), t, comparer);
});
});
test("Comment bottom padding in dynamic panel", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(800, 600);
const json = {
"pages": [
{
"name": "page1",
"elements": [
{
"type": "paneldynamic",
"name": "question1",
"showCommentArea": true,
"panelCount": 1,
"templateElements": [
{
"type": "text",
"name": "question2"
}
]
}
]
}
],
"showQuestionNumbers": "off"
};

await initSurvey(framework, json);
await t.wait(100);
await takeElementScreenshot("panel-dynamic-comment.png", ".sd-question--paneldynamic", t, comparer);
});
});

});

0 comments on commit 7b0ccb8

Please sign in to comment.