Skip to content
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 v3.12.0 - Cannot resolve a Slate point from DOM point: [object Text],0 #4576

Closed
SiddharthSham opened this issue Jun 12, 2023 · 10 comments

Comments

@SiddharthSham
Copy link

Describe the bug

On v3.12.0, focusing the cursor in any Portable Text Editor field throws the following error:

Cannot resolve a Slate point from DOM point: [object Text],0

This used to work perfectly in v3.11.5, so it must be a regression in v3.12.0

To Reproduce

  1. Ensure you are using version 3.12.0
  2. Create a Portable Editor Field
  3. Attempt to type in any content / focus the cursor

Expected behavior
Content can be input

What operating system are you using?
MacOS Ventura 13.4 (22F66)

Which versions of Node.js / npm are you running?
v18.14.2

Additional context
The problem seems to originate from Slate, so it might be a quickfix to rollback to a working version.

@bobinska-dev
Copy link

Hello @SiddharthSham 👋
Could you update your sanity versions and see if this error persists? We are not able to recreate this....

@SiddharthSham
Copy link
Author

SiddharthSham commented Jul 3, 2023

Hello @bobinska-dev , I did test this last weekend with v3.14.1 as well, and I confirm the error still exists with PortableText :(

@umxr
Copy link

umxr commented Jul 4, 2023

@SiddharthSham Are you getting this error with a custom input? or just the native portable text block. im having the same issue. in my case, we have a custom input

@SiddharthSham
Copy link
Author

@umxr I get the error regardless of whether a custom input is being used or not. However, I did first notice it when using a custom input (for field-level localisation). Are you able to get rid of this error by removing the custom error, by any chance?

@d4v1d82
Copy link

d4v1d82 commented Jul 5, 2023

@bobinska-dev @umxr I can confirm I have the same issue while using sanity-plugin-internationalized-array with portable text. You can also check the issue in the project sanity-io/sanity-plugin-internationalized-array#15 that refers to the problem.
The error is not present in v3.11.5 but is present from v3.12.0

@umxr
Copy link

umxr commented Jul 5, 2023

@d4v1d82 I recently checked with v3.14.1 and still had the issue

@d4v1d82
Copy link

d4v1d82 commented Jul 5, 2023

Sorry @umxr wrong copy/paste, I've updated the comment with the right version that is 3.11.5

@SimeonGriggs
Copy link
Contributor

This error, when seen in the Internationalized Array plugin, is fixed in version 1.10.0

@SiddharthSham
Copy link
Author

I see the error is resolved when all the props are passed to the member, thanks to @SimeonGriggs for helping figure that out!

@github-actions
Copy link
Contributor

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants