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

Autofocus doesn't work if editor has any extension that has addNodeView #1608

Closed
aizaiz opened this issue Jul 17, 2021 · 2 comments
Closed
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@aizaiz
Copy link

aizaiz commented Jul 17, 2021

Description
Autofocus doesn't work if editor has any extension that has addNodeView for example https://github.com/ueberdosis/tiptap/blob/main/packages/extension-task-item/src/task-item.ts

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. add tasklist and taskitem extension
  2. add option autofocus: true
  3. autofocus should not work
  4. then remove tasklist and taskitem from the extension
  5. autofocus is working now

CodeSandbox
I created a CodeSandbox to help you debug the issue:
https://codesandbox.io/s/tiptap-react-forked-n9wzf?file=/src/App.tsx

Expected behavior
Autofocus should work normally

Environment?

  • operating system: macOS big sur
  • browser: Chrome
  • tiptap version: 2
@aizaiz aizaiz added Type: Bug The issue or pullrequest is related to a bug v2 labels Jul 17, 2021
@dstoyanoff
Copy link

I can confirm the above is happening. Any plan for a fix of this?

@philippkuehn
Copy link
Contributor

philippkuehn commented Aug 11, 2021

This has nothing to do with node views. Autofocus doesn’t seem to work at all with React 😅
follow up at #1716

andrewlu0 pushed a commit to trybaseplate/tiptap that referenced this issue Oct 20, 2023
…, fix ueberdosis#1608, fix ueberdosis#1520

* remove async createNodeViews

* focus asynchronously to fix weird bugs in react
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

No branches or pull requests

3 participants