Skip to content

Commit

Permalink
#6959 Dropdown in Read-only mode - The selected choice text overlaps
Browse files Browse the repository at this point in the history
Fixes #6959
  • Loading branch information
novikov82 committed Sep 14, 2023
1 parent f70cd9a commit 042634c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/defaultV2-theme/blocks/sd-dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
}
}

.sd-input--disabled .sv-string-viewer {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.sv-popup.sv-popup--dropdown.sv-popup--dropdown {
.sd-list__item-body {
line-height: multiply(1.5, $font-editorfont-size);
Expand Down
30 changes: 30 additions & 0 deletions visualRegressionTests/tests/defaultV2/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,5 +633,35 @@ frameworks.forEach(framework => {
await takeElementScreenshot("dropdown-question-overlay-popup-selected.png", Selector(".sv-popup.sv-single-select-list"), t, comparer);
});
});
test("Check long text in disabled dropdown question", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1000, 700);
await initSurvey(framework, {
"logoPosition": "right",
"mode": "display",
"pages": [
{
"name": "page1",
"elements": [
{
"type": "dropdown",
"name": "question1",
"defaultValue": "Item 1",
"choices": [
{
"value": "Item 1",
"text": "Some long text goes here Some long text goes here Some long text goes here "
},
"Item 2",
"Item 3"
]
}
]
}
]
});
await takeElementScreenshot("dropdown-question-disabled-long-text.png", Selector(".sd-question"), t, comparer);
});
});

});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 042634c

Please sign in to comment.