logseq / logseq/logseq

Undo in a property block permanently erases all edits

Open
#8,884 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

can-be-reproduced editor:undo-redo props
Dominant language
Clojure
Stars
45k
Forks
2.8k
Avg merge
1d 22h
Merged PRs (30d)
105

Description

Search first
  • I searched and no similar issues were found
What Happened?

When editing multiple properties in a property block, if you hit the UNDO shortcut key all edits are erased. (I think the expected behavior should be to just erase the edits on the current line/property).

This video demonstrates this behavior on the mac in logseq 0.8.18: https://drive.google.com/file/d/11nkvUQsI6JD1lEUeuaWhu_-CWsm70Ppi/view?usp=share_link

I neglected to show this in the recording, but when this happens REDO does not work. The edits are permanently lost.

Reproduce the Bug
  1. Open a template that has a block with multiple properties on it.
  2. Click into the properties area and start adding values for the several properties
  3. Without leaving edit mode, hit the keyboard shortcut for UNDO
  4. All edits will be erased
  5. Hit the keyboard shortcut for REDO.
  6. No edits are restored
Expected Behavior

I would hope that just the edits in the current property would get erased.
I would hope that hitting REDO would restore the edits just made in the current property.

Screenshots

https://drive.google.com/file/d/11nkvUQsI6JD1lEUeuaWhu_-CWsm70Ppi/view?usp=share_link

Desktop or Mobile Platform Information

macOS 12.6.3, logseq 0.8.18

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

First reproduce the issue in the property-block editor on macOS using the listed six-step sequence, then trace the editor's undo and redo entry points. Done means undo removes only the current property's edits and redo restores them without erasing other property edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
desktop, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.