nextcloud / cookbook

🍲 A library for all your recipes
https://apps.nextcloud.com/apps/cookbook
GNU Affero General Public License v3.0
540 stars 93 forks source link

Recipe edits lost when creating new steps and pasting from clipboard #2590

Open Stampede opened 1 week ago

Stampede commented 1 week ago

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

benchti commented 5 days ago

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

Stampede commented 4 days ago

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