Edits of image captions are not saved
When editing image captions (filename of the inserted image by default), the edits are not saved. Usually edits in text trigger the Saving... status in the top right corner. When editing image captions, this does not happen.
In very rare cases, edits in the captions are saved, but my feeling is that this has to do with the editor saving larger portions of the document and thus saving the captions as well.
Environment
Stock Nextcloud 23.0.2 running in Hansson VM.
Steps to reproduce
- Create new text document
- Insert image
- Edit caption
- Close editor
- Reopen editor. Observe caption
Reproducible on Nextcloud 24.
@allesblinkt @mejo- I'm not able to reproduce the issue on Nextcloud 25 or dev (26). Could you try it again?
I checked the implementation and the value is only saved after having pressed the "Enter" key. Are you pressing it?
I'm closing this for now but feel free to reopen if there was a misunderstanding and the issue is still valid.
Probably I didn't press enter and I don't think that should be required either. In an editor every change should be consistent in my opinion :relaxed:
One option would be to listen on the blur event and save updated image caption in this case.
Probably I didn't press enter and I don't think that should be required either.
Absolutly agree! This is one of the most annoying behavior users reported on our cloud instance.
One option would be to listen on the
blurevent and save updated image caption in this case.
Or debounce the change / input event
There's also #1890. One of these probably is a duplicate.
I did not notice i could actually change the content because the file name was long and no cursor appeared when i clicked it - probably because it was cut off at the end of the text. Pressing enter also yielded no visual feedback. I would have expected the cursor to move to the text below after pressing enter.
Fixed by #3631