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

Pasting into empty editor with autofocus adds newlines #1588

Closed
mmachatschek opened this issue Jul 14, 2021 · 0 comments
Closed

Pasting into empty editor with autofocus adds newlines #1588

mmachatschek opened this issue Jul 14, 2021 · 0 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@mmachatschek
Copy link
Contributor

Description
When initializing an empty editor instance with the option autofocs: true and pasting text after the initialization, the editor adds the pasted text and adds a newline at the end of the editor.

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. Go to the sandbox
  2. Copy a text from somewhere
  3. After loading the sandbox, paste the text without clicking outside the editor
  4. A new line is added to the content

CodeSandbox
I created a CodeSandbox to help you debug the issue: https://codesandbox.io/s/funny-tdd-e3w0n

Expected behavior
No newline in the editor after pasting with autofocus set.

Environment?

  • tiptap version: 2
@mmachatschek mmachatschek added Type: Bug The issue or pullrequest is related to a bug v2 labels Jul 14, 2021
@mmachatschek mmachatschek changed the title Pasting into the editor with autofocus adds newlines Pasting into empty editor with autofocus adds newlines Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant