Skip to content

Commit c6ff2d1

Browse files
committed
IBX-11804: Missing text wrapping and ellipsis in table column causes layout collapse
1 parent 4993246 commit c6ff2d1

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ const parse = (baseElement = doc) => {
202202
}
203203

204204
for (const tooltipNode of tooltipNodes) {
205-
const hasEllipsisStyle = getComputedStyle(tooltipNode).textOverflow === 'ellipsis';
205+
const computedStyle = getComputedStyle(tooltipNode);
206+
const hasEllipsisStyle = computedStyle.textOverflow === 'ellipsis' || computedStyle['-webkit-line-clamp'];
206207
const hasNewTitle = tooltipNode.hasAttribute('title');
207208
const tooltipInitialized = !!tooltipNode.dataset.originalTitle;
208209
let shouldHaveTooltip = !hasEllipsisStyle;

src/bundle/Resources/public/scss/_tables.scss

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@
179179

180180
&__cell {
181181
vertical-align: middle;
182-
overflow-wrap: break-word;
183-
max-width: 40vw;
184182

185183
&--has-checkbox {
186184
width: calculateRem(48px);
@@ -221,6 +219,19 @@
221219
}
222220
}
223221

222+
&__body-cell-content {
223+
&--truncate {
224+
display: -webkit-box;
225+
line-clamp: 2;
226+
-webkit-line-clamp: 2;
227+
-webkit-box-orient: vertical;
228+
overflow: hidden;
229+
word-break: break-all;
230+
max-width: 40vw;
231+
width: max-content;
232+
}
233+
}
234+
224235
.table &__cell--close-left,
225236
.table &__header-cell--close-left {
226237
padding-left: 0;

0 commit comments

Comments
 (0)