diff --git a/src/defaultV2-theme/blocks/sd-paneldynamic.scss b/src/defaultV2-theme/blocks/sd-paneldynamic.scss index 824e6eac2e..16e5c5be38 100644 --- a/src/defaultV2-theme/blocks/sd-paneldynamic.scss +++ b/src/defaultV2-theme/blocks/sd-paneldynamic.scss @@ -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); diff --git a/visualRegressionTests/tests/defaultV2/etalons/panel-dynamic-comment.png b/visualRegressionTests/tests/defaultV2/etalons/panel-dynamic-comment.png new file mode 100644 index 0000000000..88e10f7922 Binary files /dev/null and b/visualRegressionTests/tests/defaultV2/etalons/panel-dynamic-comment.png differ diff --git a/visualRegressionTests/tests/defaultV2/paneldynamic.ts b/visualRegressionTests/tests/defaultV2/paneldynamic.ts index 686c35460c..34715a5576 100644 --- a/visualRegressionTests/tests/defaultV2/paneldynamic.ts +++ b/visualRegressionTests/tests/defaultV2/paneldynamic.ts @@ -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); + }); + }); + });