-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Regression in DomParser style matching from 1.21.0 to 1.21.1 #1473
Comments
Friendly bump. This is something we can work around but it does have the potential to break any new Tiptap projects started on the stable versions, or for anyone running |
You're going to have to provide a full reproduction (using plain ProseMirror). I don't see anything going wrong when I test a parse rule like that. |
Oh never mind, I see what's going on. Browsers (but not JSDOM) 'normalize' composite properties like This is kind of annoying because it means our style matching system, which treats styles as property name + value pairs, doesn't really match the reality of CSS, where there's multiple property names used to express the same thing. I.e. the issue is not just that a rule for |
Found a workaround — you can still query |
Thank you @marijnh, all of our tests are passing now, so I'm confident in your fix. Thank you for your quick response! |
Hi @marijnh, I'm one of the maintainers of Tiptap and we've hit a regression when upgrading from [email protected] to [email protected]
This is a reduced version of what we are doing over the course of many functions calls
In 1.21.0 we get:
And, in 1.21.1 we get:
So the underline mark is not matching, when it should be. This is what we are using as the underline spec:
![image](https://private-user-images.githubusercontent.com/1852538/338654119-199c7399-a742-450b-a343-0fe4279e858c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjE4NzQsIm5iZiI6MTczOTU2MTU3NCwicGF0aCI6Ii8xODUyNTM4LzMzODY1NDExOS0xOTljNzM5OS1hNzQyLTQ1MGItYTM0My0wZmU0Mjc5ZTg1OGMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTkzMjU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDE5MzBlMDJiMjc1MzYxNTYzOTI0Y2JlMTQ3ZjM4OGUxMGRmMzdlNWIyMzJhOTk1ZGE5Y2YxZTIwODZmMWExYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.BxVEgmjmmEZl9LE59AFmkiAKjoLxv4JV3HbNgu2AZ-A)
In our code: https://github.com/ueberdosis/tiptap/blob/b941eea6daba09d48a5d18ccc1b9a1d84b2249dd/packages/extension-underline/src/underline.ts#L52-L56
I'm not familiar enough with CSSStyleDeclarations to totally understand what the difference could be, but here is the diff: ProseMirror/prosemirror-model@1.21.0...1.21.1
Really appreciate your time, no rush to fix, we will just stay on 1.21.0 for now.
The text was updated successfully, but these errors were encountered: