text icon indicating copy to clipboard operation
text copied to clipboard

Edits of image captions are not saved

Open allesblinkt opened this issue 3 years ago • 1 comments

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

  1. Create new text document
  2. Insert image
  3. Edit caption
  4. Close editor
  5. Reopen editor. Observe caption

allesblinkt avatar Mar 23 '22 20:03 allesblinkt

Reproducible on Nextcloud 24.

mejo- avatar May 10 '22 22:05 mejo-

@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?

julien-nc avatar Oct 26 '22 13:10 julien-nc

I'm closing this for now but feel free to reopen if there was a misunderstanding and the issue is still valid.

julien-nc avatar Oct 26 '22 13:10 julien-nc

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.

mejo- avatar Oct 26 '22 13:10 mejo-

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 blur event and save updated image caption in this case.

Or debounce the change / input event

susnux avatar Oct 26 '22 13:10 susnux

There's also #1890. One of these probably is a duplicate.

max-nextcloud avatar Nov 15 '22 08:11 max-nextcloud

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.

max-nextcloud avatar Nov 15 '22 08:11 max-nextcloud

Fixed by #3631

mejo- avatar Jan 04 '23 18:01 mejo-