Skip to main content

Hi,

after calling `updateDraft` from our composer plugin, the composer does not work properly any more. This happens even if I keep the current draft HTML without modifying it at all. Breakage we’ve seen:

  • Cut/paste does not work any more
  • Templates do not insert any more
  • Templates insert at the wrong location
  • Errors in JavaScript console

Would you be able to look into it?

Best
Richard

Hi Richard,

Happy to help with this!  Would you please share the JavaScript errors you see and a code stub where you call updateDraft?


Hi Evan,

Here is the code that does not change the content and still reproduces the issue: https://gist.github.com/neelance/0154c6fd97f80cad0d8e533d4531456a

I can’t send the JS error, because most of the time there is none, it just behaves in a broken way. When triggering the issue repeatedly, I managed to cause a JS error some time ago. Please already try to reproduce it without looking for an error, because it is already broken if there is no error yet.


Hi Richard,

Unfortunately, I won’t be able to assist with that limited of a code stub and no console error.  In the meantime, I suggest you check the working example that we built and tested about two hours ago:

https://github.com/dugjason/front-plugin-tanstack-start/blob/main/src/components/update-draft.tsx


Hi Evan,

I now used your example code for reproducing the issue. Here is how I can reproduce the issue quite reliably:
1. Change “updateMode” to “replace”
2. Reload
3. Push the “Update Draft” button twice
4. Observe that you now can not use the “cut” operation on the “This is a draft” text.

I hope you can reproduce it now. Please tell me if not.


Hi Richard,

I was able to duplicate that behavior and I’ve raised this as a bug to our engineers.  I’ll follow-up once resolved.  I recommend using “insert” until that point, as it doesn’t seem to have the same issue in testing.


Hi Evan,

That’s great. Thanks for looking into it.

Unfortunately using “insert” is not really an option for our use-case. Looking forward to your fix.

Best
Richard


Hi Evan,

Do you have any estimate on when you will be able to look into this bug? Currently the updateDraft functionality is quite broken for our customer support agents. There is not even a good workaround I could tell them to get the message editor back to working properly.

Best
Richard


This is not prioritized on our product roadmap so there is currently no ETA.  If you’d like to be informed of when a fix is deployed, please contact support via our Portal:

https://help.front.com/en/contact-us


For reference: I will not bother to report bugs in the future. Putting in the effort and getting nothing in return is just disappointing. 😒


Hey ​@richard_afilio this is Phoebe from the Support team at Front! The portal submission is simply an option which will allow our team to send you a direct message when a bug is fixed. 

Our team actually fixed this bug earlier today. 

Can you please make sure you are on the most recent version of Front? It should be resolved if you update to our most recent release. 


Hey Phoebe,

I can confirm that the bug seems fixed. Thank you for taking care of it.

Best
Richard