-
-
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
update event not triggered on checkbox when onReadOnlyChecked returns true and editable is false #3676
Comments
We're struggling with the exact same issue while trying to save the contents of a non-editable editor via an API call. (And yes, we're sponsors.) |
We're not able to save updated contents (to a DB) because the contents are not updated when toggling a TaskItem (with I've forked/updated the CodeSandbox of @deterralba (thx) to better illustrate the problem we're facing: https://codesandbox.io/s/tiptap-taskitem-content-not-updated-when-not-editable-tnsbkx?file=/src/App.js |
I found the same issue and tried to use the first parameter |
I updated the Sandbox to Tiptap 2.0.3, the problem still exists. Any chance that a team member looks into this or can give a hint? |
I faced the same problem, in the end i used patch-package to changed the source code, i am using @tiptap/extension-task-item@2.0.4, this is the change:
the original code only passes
i also ignored the return value, if there is a |
FWIW here's another solution that works for me... although still feels quite hacky NOTE 1: I'm working in Vue but imagine the approach is similar for any other JS Quick rundown of the approach:
Welcome any suggestions or corrections... as I said this still feels quite hacky but might help someone.
|
Issue ueberdosis/tiptap#3676 means changes in View mode will not be saved
* feat: add support for tiptap task-item * fix: save state when task-item is updated in View mode * fix: disable task-list checkbox in View mode Issue ueberdosis/tiptap#3676 means changes in View mode will not be saved * fix: mock tiptap edit mode for task-list Will be made redundant once ueberdosis/tiptap#4044 is fixed * style(task-item): minor style changes * chore: format using prettier --------- Co-authored-by: Bread Genie <msuhailbh07@gmail.com>
This is still a problem in 2.1.13. |
Any chance to get this fixed? I'm currently pouring workaround over workaround to make this work, but I don't think that should be necessary, neither does it seem like doing that is maintainable. |
What’s the bug you are facing?
Hello & thank you for this awesome lib 👍
The
'update'
event is not not triggered on checkbox elements when the editor is not in its editable state butonReadOnlyChecked
returnstrue
(tested withreact
)Which browser was this experienced in? Are any special extensions installed?
latest firefox version on ubuntu
How can we reproduce the bug on our side?
with this sandbox : https://codesandbox.io/s/update-not-trigger-on-checkbox-when-editable-is-false-v87v22?file=/src/App.js:468-485
you can see in the console that the update event is not trigger when editable is false, but it is when editable is true.
Can you provide a CodeSandbox?
here https://codesandbox.io/s/update-not-trigger-on-checkbox-when-editable-is-false-v87v22?file=/src/App.js:468-485
What did you expect to happen?
I would expect the update event to be trigger when the checkbox state changes, even if editable is set to false. Is this is not a bug but a API design choice, do I have the ability to trigger manually an update event?
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: