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

[Bug]: Undo inputRule misses last typed character #6232

Open
1 task done
florisluiten opened this issue Apr 3, 2025 · 0 comments
Open
1 task done

[Bug]: Undo inputRule misses last typed character #6232

florisluiten opened this issue Apr 3, 2025 · 0 comments
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@florisluiten
Copy link

Affected Packages

core, inputRule

Version(s)

2.11.7

Bug Description

When using markdown notation for creating a mark and then executing "undo", I expect to see the full typed text without the markup. Instead, what happens, is that the text including the stars are removed.

Eg:

I'm not **bold*

Typing a "*" makes the text bold (correct), typing Ctrl+Z I expect to see the text **I'm not bold**, but instead I see **I'm not bold* (see that the last star missing).

I dug into the code, and discovered that the an inputRule applies the mark before the text is inserted. I suspect that this causes this issue that the last character is missing.

Browser Used

Firefox

Code Example URL

https://codesandbox.io/s/tiptap-js-fv1lyo

Expected Behavior

See the text **I'm not bold**, but instead I see **I'm not bold* (see that the last star missing).

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@florisluiten florisluiten added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Apr 3, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Tiptap: Issues Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant