-
Notifications
You must be signed in to change notification settings - Fork 576
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] WYSIWYG not saving correctly in draft mode #777
Comments
Hey @adronitis, I think I've been able to replicate this bug on Twill 2.1.1, as well as 2.3.1, but somewhat unreliably... On my end, the bug happens regardless of draft or live status. Steps to reproduce:
I get a standard browser warning about unsaved changes, but not reliably. Sometimes the save actually works and the refresh follows through normally. Does that make any sense? Is this different to what you are describing? |
Indeed, following your steps I can reproduce the not saving issue. In addition, sometimes if the text is copied from a document (can be Google Doc or anything), then the issue also appears right away. The only way to make it workable again is to remove the block and re-add it again then paste the text without formatting. However with your steps, if you do "Update and Close" sometimes it also works. |
Thanks for taking some time to test! I'll poke around the WYSIWYG source code over the next few days and report here :) |
@pboi20 thanks for digging into this! The main issue seems similar #839. The issue mentioned with pasted content from Google Docs is more complex. We ran into it too, a few times. It produces an error in console from Quill which is basically not booting correctly on load, or crashing at runtime, preventing any further update to the field content. We've reported the issue: slab/parchment#87. There are very specific invisible characters causing this. We've went as far as adding a dynamic "fix WYSIWYG fields" button to the form sidebar for some of our clients that would sanitize that faulty content on demand from the backend and reload the page. Definitely not the solution we want to implement in Twill core. |
Oh, awesome! We don't need to fork Quill to leverage this, I believe. |
@ifox Thanks for the feedback! I see that the copy/pasting issue has been covered extensively in other threads. I'll focus on the main issue — WYSIWYG not saving reliably. I'll take some more time to test but so far, I think this could be caused by the 600ms debounce on Looking at the vuex mutations, there is a difference between:
I've been testing in light of this and can't seem to replicate the issue if I always make sure to wait > 600ms between edit and update. @adronitis Does that fit with your experience of the issue? Is there anything else I'm missing? |
Nice, yes this fit what I was experiencing in the very beginning,. This could be the issue! |
Closing as the OP issue has been fixed. The copy/paste issue should still be addressed separately to resolve #458. |
Translated WYSIWYG is not saving when clicking "Save as draft".
The only way to work around this is to double save with "Save as draft" or use the other save button or edit any other input field before clicking "Save as draft".
The text was updated successfully, but these errors were encountered: