Fixed CTRL+S with multiple CodeMirror editors

Lukas W.

Well-known member
Affected version
2.0.4
Saving a form with multiple CodeMirror editors through the CTRL+S keyboard shortcut while in any one editor will discard all changes made in any other editor.

To reproduce:
  • Create a new template modification
  • Enter some random data
  • Click into the "replace" field
  • Press CTRL+Save
  • You will receive an error message that you have to enter something into the "find" field.

I've noticed this issue when creating an ACP page for my add-on with multiple editors for optional content, that would silently discard any changes made if saving through only a single editor.
 
Thanks this should be sorted now. I've moved the save process for the code editor to an event listener that fires on submit so all code editors within the form should get saved on submit, rather than just the one doing the submitting.
 
Top Bottom