-
Notifications
You must be signed in to change notification settings - Fork 424
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
fix: change dynamic html string w/CSP safe code to fix scroll, fix #914 #919
Conversation
Okay I'm experiencing weird things, if you scroll from left to right fast, the data shows up and then disappears shortly after rendering (seems to be column auto correct) Do you have any ideas where the code for this logic exists? since my guess would be its a change in structure from old to new and there are some code that still expects the old style Edit: |
I have found the issue, ill just do some cleanup then commit it issue seems to be comming from the new code creating a div inside a div with all the child elements below
|
oh that's great, never taught of looking at the DOM element it creates, the new Cypress test I added last week for "Example 1 Basic Grid" should cover this use case pretty well now, I made it scroll slowly since it showed more often while performing that action. Out of curiosity, could I see the code you changed since last time? I'd like to see where the div in a div happened. is it ready to be merged then? I think it looks good for my point of view since all Cypress E2E tests are passing, including the new test I added. Perhaps the only other thing I could would be to test a little more locally. Also forgot to mention that I had to rename your PR title because your title would be caught by the release process, we rely on Conventional Changelog to automatically process release & changelog, in short it requires a |
This code is ready to get merged |
Thanks I tried it locally and see no more issues, good job 👍🏻 |
@JesperJakobsenCIM so while I was giving this a try in Slickgrid-Universal (my lib based on slickgrid), I found that I had an issue in my lib after applying your changes, the issue was around the lines shown below. I thought it might interesting for you to know since it's CSP related Lines 3934 to 3937 in 1a93a64
mainly the So long story short, the DOMPurify issue brought up another change that should be addressed eventually, I'll probably work at it in the next couple days before the release, there are still many areas of the code that uses Formatters with HTML strings and that could cause other indirect issues like I had, converting the code below to be native HTML element would help with CSP compliance (which is what I will do)... or in other words, there might be other areas of SlickGrid core or plugins that need refactoring to be fully CSP compliant and there are still areas of the code that still require SlickGrid/src/slick.groupitemmetadataprovider.ts Lines 62 to 78 in 1a93a64
|
@JesperJakobsenCIM as per what I wrote in previous paragraph, I created PR #925 to convert Group Formatter to native HTML elements, I also used |
This is not ready to get merged, its just to have a place to discuss for now