fix(layout): workaround for hardcoded table layout, closes #3205 (#3251)

This commit is contained in:
Huang Xin
2026-02-10 22:19:36 +08:00
committed by GitHub
parent 9a11b05833
commit c9a69a922b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -841,7 +841,8 @@ export const applyTableStyle = (document: Document) => {
const computedTableStyle = window.getComputedStyle(table);
const computedWidth = computedTableStyle.width;
if (computedWidth && computedWidth !== 'auto' && computedWidth !== '0px') {
table.style.width = `calc(min(${computedWidth}, var(--available-width) * 1px))`;
// Workaround for hardcoded table layout, closes #3205
table.style.width = `calc(min(${computedWidth}, var(--available-width)))`;
}
if (totalTableWidth > 0) {
const scale = `calc(min(1, var(--available-width) / ${totalTableWidth}))`;