-
Notifications
You must be signed in to change notification settings - Fork 418
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(structure): annotations not opening in portable text editor #6198
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated Apr 3, 2024 4:19 PM (UTC)
|
Obviously lower priority than annotations, but just noting that this will reintroduce the scroll jumping issue with PTE in Presentation. |
I just commented here on this. Why do we open the blurred path @rdunk ? This is why the edit annotation thing fails. The text node is "opened", and then the "markDef" (annotation) path is being closed (we don't allow multiple path trees being opened at once). |
@rdunk - Could this scroll jumping perhaps be fixed by moving these lines down to line |
I added a component test for this that will fail with the problematic code. |
@skogsmaskin I'll verify that as a workaround, I think we tested that before but I'll double check. Done some digging and looks like I didn't catch this as our test document didn't contain an Annotation, only InlineBlock. This line, which is unique to Annotation's |
Looks like that doesn't solve it unfortunately. |
@rdunk I think regardless of the final fix that is needed for presentation to work, we shouldn't be setting the path to the path that was blurred, it sounds like a contradictory behaviour from this perspective. This change fixes the issue, I think we should deploy a new version with this fix today. |
Agreed with merging this as this bug is much worse than the scroll issue. The problem is if an initial openPath is defined that references some block in the PTE, without setting the openPath on blur, the openPath is maintained as its initial value, which is incorrect. It's not the focus path we are setting to the blurred path, just the openPath, which AFAICT is correct. I think ultimately the bug isn't caused by setting that openPath on blur, it is caused by the Annotation triggering the blur event after it sets the openPath, which resets it. |
* fix(structure): annotations not opening in PTE, blurred path is set as open path * test(form/inputs): add test ids for annotation toolbar popover * test(playwright-ct): add test for editing existing annotation --------- Co-authored-by: Per-Kristian Nordnes <per.kristian.nordnes@gmail.com>
With the changes pushed in #6129 a bug was introduced into the PTE editor.
Annotations wont open.
The issue is generated by the onBlur action, when it's triggered, it's setting as
openPath
the blurred path.This specific change was introduced in that PR, possibly an oversight?
Description
What to review
Testing
Notes for release
Fixes an issue in PTE in which annotations were not opening by a bug introduced in v3.36.3