-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
onFocus does not fire when using TaskList extension #2405
Comments
I can’t reproduce this. For me the editor gets blurred when calling setTimeout(() => {
editor.commands.blur()
}, 0) Otherwise create a reproducable codesandbox and feel free to reopen. |
Screen.Recording.2022-01-20.at.15.05.20.movI have now tried everything, I basically stripped down Tiptap to passing the content and harcoding the onFocus function and still, whenever I click on the checkbox the editor is focused, I even tried calling blur on every render via a useEffect hook: useEffect(() => {
const editor: Editor = tiptapRef.current?.getEditorInstance()
if (editor) {
editor.commands.blur()
}
}) Still not working :( |
aha! I just discovered that on chrome it is working |
Hmm, this only seems to be an issue with safari. Every other browser works as expected. |
yeah, the callback looks like it is correct, so maybe it is a problem with the |
ok, I found a workaround for safari. |
thanks a lot @philippkuehn! Any word on which release will I be able to test this? |
Update to the latest version :) |
This was fixed in |
What’s the bug you are facing?
I'm using the task list extension, on some of the screens in my application I display a tiptap field, but I don't want it to be fully editable, just want to be able to check the checkboxes inside.
In order to prevent the user from editing but still allow the checkbox editing I'm using the following workaround:
When the editor receives focus the onFocus function is called and the editor blured, this works fine for normal interactions, but the TaskList plugin somehow does not fire this callback, it just marks the checkbox and then immediately focuses the editor
How can we reproduce the bug on our side?
Use a tiptap editor with the TaskList extension
Can you provide a CodeSandbox?
No response
What did you expect to happen?
the
onFocus
callback should be fired for all focus events not only those initiated by the userAnything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: