cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Recipe edits lost when creating new steps and pasting from clipboard

Open Stampede opened this issue 1 year ago • 2 comments

Description Changes not saved when inserting a cooking step by pasting from clipboard.

Reproduction Steps to reproduce the behavior:

  1. Copy some text to your clipboard with a cooking instruction.
  2. Go to a recipe
  3. Click on "Edit"
  4. Scroll down to 'Instructions'
  5. Click on + Icon to "Insert entry above"
  6. Paste text from clipboard into the new empty instruction field
  7. Click "Save"

Expected behavior Recipe reflects the changes that I just "saved"

Actual behavior Changes are lost.

Oddly, it will save the changes if I manually edit them with the keyboard! But a lot of times, I think there are too many steps to take in one "instruction" so I will cut to clipboard from step No. 2 (for example), insert a new step below it, and paste the cut text. When I click save, step No. 2 indeed saves the changes (and loses the data formerly in it), but the new step No. 3 was never created.

If I paste the text, then type some characters in with the keyboard, then delete the extra characters, it saves properly also. That is my current workaround.

Browser Brave Version 1.73.89 Chromium: 131.0.6778.69 (Official Build) (64-bit)

Versions Nextcloud server version: Nextcloud Hub 8 (29.0.8) Cookbook version: 0.11.2 Database system: PostgreSQL 16.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit (I found this at the https://cloud.mydomain.com/settings/admin/serverinfo) page

Stampede avatar Nov 23 '24 04:11 Stampede

could you try to paste your recipe here in order to try to reproduce ?

benchti avatar Nov 24 '24 21:11 benchti

could you try to paste your recipe here in order to try to reproduce ?

Here are the recipe.json files. OLD VERSION.json is the one that was giving me the trouble. I wanted to move the comments about cooking with wine from the "description" down to the actual instructions, so I cut and pasted into the new Step 3.

NEW VERSION.json is what I have now, where I still cut and pasted the new step, but I had to type some characters, then backspace delete the characters in the Step 3 text box and then click save, otherwise, Step 3 would just disappear after clicking Save.

NEW VERSION.json OLD VERSION.json

Stampede avatar Nov 25 '24 14:11 Stampede