# Save or Cancel not working in code editor

**URL:** <https://forum.mautic.org/t/save-or-cancel-not-working-in-code-editor/24835>\
**Category:** Product Support\
**Created:** [July 22, 2022, 8:19am UTC](https://forum.mautic.org/t/save-or-cancel-not-working-in-code-editor/24835 "2022-07-22T08:19:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nord](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nord/32/950_2.png) [@Nord](https://forum.mautic.org/u/Nord)\
**Post date:** [July 22, 2022, 8:19am UTC](https://forum.mautic.org/t/save-or-cancel-not-working-in-code-editor/24835/1 "2022-07-22T08:19:08Z")

</div>

**Your software**  
My Mautic version is:4.4.0  
My PHP version is: 7.4.30  
My Database type and version is: MySQL 5.7.32-35-log

**Your problem**  
My problem is:  
Save or Cancel not working in code editor

1. Open Email list view
2. Click New
3. Go into Builder
4. Click Edit code
5. You can then press save or cancel as expected
6. Close builder and then re-open the builder
7. Go into Edit Code

Expected Result:  
You can press Save or Cancel to close the Code Editor

Actual Result:  
Save or Cancel does not close the editor, you need to press the X in the top right to close it down.

These errors are showing in the log:  
N/A

Steps I have tried to fix the problem:  
A refresh of the web page will allow you to go back into it and it will work as expected again.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 22, 2022, 10:41am UTC](https://forum.mautic.org/t/save-or-cancel-not-working-in-code-editor/24835/2 "2022-07-22T10:41:01Z")

</div>

Thanks, this is connected tho this bug:

> <https://github.com/mautic/mautic/issues/11173>
>
> \### Mautic Version
> 
> 4.2.x series
> 
> \### PHP version
> 
> 7.4
> 
> \### What browser…s are you seeing the problem on?
> 
> Chrome
> 
> \### What happened?
> 
> Ihave to say that since we upgraded to 4.x we have a lot of problems using the editor. This is just one of them:
> 
> Using the editor suddenly when close the editor and back again, some elements disappear, usually text blocks. That happen when for example try to add a raw html5 block. But not only in that case. Sometimes I need to close the editor and open again Because the code editor does not open, so I need to reload, when reload, then that happen, some text blocks dissapear
> 
> I made a video https://imgur.com/a/o6mXvhm
> 
> 
> 
> \### How can we reproduce this issue?
> 
> Step 1: Create new email, select Brienz template, add HTML5 Raw block, close the editor, open again and some text blocks are missing. 
> 
> 
> \### Relevant log output
> 
> \_No response\_
> 
> \### Code of Conduct
> 
> \- \[X\] I confirm that I have read and agree to follow this project's Code of Conduct
> 
> \<bountysource-plugin\>
> 
> \---
> Want to back this issue? \*\*\[Post a bounty on it!\](https://app.bountysource.com/issues/109790899-editor-with-unstable-behavior?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github)\*\* We accept bounties via \[Bountysource\](https://app.bountysource.com/?utm\_campaign=plugin&utm\_content=tracker%2F5355074&utm\_medium=issues&utm\_source=github).
> \</bountysource-plugin\>

Not fixed yet.
