Don't auto-close popup text editor on save (edited title)

This Auto-save record plugin from @m.finamor is great, but I would suggest one feature which would greatly enhance editing experience.

If you are editing linked record in a modal window, the plugin will close the modal windows (same as pressing Save button in the top right of the edit modal windows). This is not a great editing experience when auto-save event happens. It would really be nice if record is just saved and modal window not closed…


Hey @primoz.rome, can you provide any additional instructions on how to reproduce this, please?

I tried it on a linked model, editing it in a popup modal, but it doesn’t seem to close for me?

Did I misunderstand?

Hey @roger … interesting. I setup the plugin for my work collegue @flavija.bornsek and the modal was closed. We will check again and @flavija.bornsek will answer and provide more information here…

Thanks for looking up to this.

1 Like

@roger see the behaviour on our side… After auto save trigger the edit modal is automatically closed.

@primoz.rome, thanks for the recording! That was very helpful.

I’m not sure whether this is a bug, oversight, or something else, but I’ll report it to the devs and let you know what they say!

After some investigation, it seems to me that this has nothing to do with the Auto-save plugin per se (as you hinted at), but is actually due to the multi-link field (Pages) being set up to use the “Expanded view” field editor:

If you switch it to Compact view, saving (whether manual or automatic) won’t close the popup editor anymore. Of course, this isn’t a great editor experience when you have a lot of pages (blurred for privacy):

If you want to try it for yourself, I forked your main environment into something called datocms-support-main-new-copy-2023-11-21.

Again, I’m not sure if this is intentional behavior (seems odd for it to be), but I’ll let you know what the devs say after they look into it.

@primoz.rome, we’ve shipped a fix for this! The Expanded View field editor should no longer auto-close after saving (whether manual or auto).

Could you please give it a try and let us know if that fixed your issue? It did in my tests.

@roger Is this in the version Record auto-save v0.1.1 ? I don’t have any update of the plugin…

@primoz.rome, it actually had nothing to do with the plug-in, but the editor field type (see my post above for a fuller explanation).

The editor was closing on save if the field editor was set to “Expanded view”, regardless of whether you were using the plug-in to auto-save or manually clicking the save button (as you pointed out). Once we fixed that underlying behavior, both the auto-save and manual save no longer close the editor.

The plug-in hasn’t changed, but now that same version should no longer close the editor (since it wasn’t the plug-in’s fault to begin with, just the editor’s default save functionality).

1 Like

@roger I can confirm this now works as expected and brings editing experience on much better level.

Thank you for the quick fix.

1 Like