-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: <col> element missing min-width (or width) style when column hasn't been resized #5435
[Bug]: <col> element missing min-width (or width) style when column hasn't been resized #5435
Comments
I'm not sure if I should open an other issue for this detail or not but it might be interesting to point out in the doc that table cells |
Would be happy to accept a PR for the original issue. For the second doc recommendation, I think that is out of scope since it is a styling question & there are multiple solutions to it |
Should be released with 2.10.0 |
Affected Packages
@tiptap/extension-table, @tiptap/extension-table-cell, @tiptap/extension-table-header, @tiptap/extension-table-row
Version(s)
2.5.8
Bug Description
The generated
<col>
elements don't have a width or min-width set on them unless the corresponding column is manually resized. For columns with wrapping text that can lead to layout jump when other column are resized (you can try resizing an empty column in the repro to provoke it) and columns can end up with a width smaller than the configuredcellMinWidth
(both in the editor and in the HTML output)While the "in editor"
<col>
are controled byprosemirror-table
(I will open an issue there and link it to this one later), the output is handled by tiptap and it can easily be fixed by changing this line :tiptap/packages/extension-table/src/utilities/createColGroup.ts
Line 40 in 84ebd51
into :
Browser Used
Firefox
Code Example URL
reproduction
Expected Behavior
The
<col>
should always have eitherwidth
ormin-width
set on them to prevent column from going below the configured minimum width.Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: