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

fix: correct setvalue in equation input behavior #3852

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

wststone
Copy link
Collaborator

@wststone wststone commented Dec 12, 2024

fix for #3851
I tried setting the caret position manually through reference of this fix, but it seems that input of foreign character (e.g. Chinese) through a virtual keyboard still has the same issue.
It seems that the original logic is just to reset the value to the previous when it closes on dismiss, so i used just store a value in ref on open and set it back on close

Checklist

  • yarn typecheck
  • yarn lint:fix
  • yarn test
  • yarn brl
  • yarn changeset
  • ui changelog

Copy link

codesandbox bot commented Dec 12, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Dec 12, 2024

🦋 Changeset detected

Latest commit: df35d66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@udecode/plate-math Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2024 2:12pm

@wststone wststone changed the title fix: correct setvalue in controlled input behavior fix: correct setvalue in equation input behavior Dec 12, 2024
@felixfeng33
Copy link
Collaborator

Looks good thanks! we need a free version of the math plugin to facilitate testing I will add it later.
Can you add a changest?

@zbeyens zbeyens merged commit f3bdf7b into udecode:main Dec 12, 2024
3 of 4 checks passed
@felixfeng33
Copy link
Collaborator

felixfeng33 commented Dec 25, 2024

We fixes the #3851 but we got this error now when we undo in the input box it will still keep the previous value 2 but not in the element.

math.mp4

@wststone
Copy link
Collaborator Author

We fixes the #3851 but we got this error now when we undo in the input box it will still keep the previous value 2 but not in the element.

math.mp4

I will take a look

@wststone wststone mentioned this pull request Dec 26, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants