-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Table: breaks after one call to updateStyleElement() #16211
Comments
…ement() closes primefaces#16211 use domSanitizer to bypass code generated Trusted Types.
Hi @ymg2006 Thanks for surfacing the issue. The three call sites replaced with textContent in #16154 appeared to be <style> tags, which are compatible with having the styles (as in, no nested tags and no markup inside the style) set with textContent. (The reasoning is described in #16153) I am not sure why there is markup being set to innerHTML of these <style> tags, but thanks for looking into a workaround. To the maintainers: if this UI breakage behavior was as easy to reproduce as described in this issue, was there a test to catch this that I was supposed to run in the contributor guidelines? Is there a place where we can introduce such basic rendering tests? |
Hi @aaronshim, |
Hi @ymg2006, To make it faster and include the fix in this week's milestone, we've fixed this issue for just the table. We'll review the pr of this issue also to make sure nothing breaks in other 19 components. Thanks a lot for reporting the issue! |
The committed change for this is breaking the responsive styles for the table in 16.9.15-LTS <style type="text/css">SafeValue must use [property]=binding: @media screen and (max-width: 960px) { #pn_id_26-table > .p-datatable-thead > tr > th, #pn_id_26-table > .p-datatable-tfoot > tr > td { display: none !important; } #pn_id_26-table > .p-datatable-tbody > tr > td { display: flex; width: 100% !important; align-items: center; justify-content: space-between; } #pn_id_26-table > .p-datatable-tbody > tr > td:not(:last-child) { border: 0 none; } #pn_id_26.p-datatable-gridlines > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tbody > tr > td:last-child { border-top: 0; border-right: 0; border-left: 0; } #pn_id_26-table > .p-datatable-tbody > tr > td > .p-column-title { display: block; } } (see https://g.co/ng/security#xss)</style> |
See #16291, breaking 17.18.9 as well. |
Describe the bug
@cetincakiroglu @mehmetcetin01140
Commit #16154 completely breaks table after resizeTableCells or onColumnDrop.
@aaronshim maybe reading innerhtml-vs-innertext-vs-textcontent helps to figure out why the whole table is broken after 17.18.7 to 17.18.8 commit.
Environment
Windows 11
Reproducer
No response
Angular version
17.3.6
PrimeNG version
17.18.8
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.12.1
Browser(s)
All
Steps to reproduce the behavior
Do anything in the table that makes a call to resizeTableCellsm then the whole css and ids and etc are broken.
Expected behavior
No response
The text was updated successfully, but these errors were encountered: