Skip to content

Potential bug - note order is out of sync when deleting a note and inserting a new note #41

@jkhaui

Description

@jkhaui

Hi,

I am experimenting with the EditorExample from the stories directory and noticed the following behaviour:

  1. Insert some text, including a series of notes (using CMD + M shortcut)
  2. Delete one of the notes (e.g. say I have 3 notes, and I go back to note no. 2 and delete it)
  3. Then I insert a new note. Initially, everything seems to re-order correctly - I have notes 1, 2 and 3 now...
  4. But then any note inserted after this point has its position calculated incorrectly.

Please see this demo for a better explanation:
*N.b I've added some CSS styling and removed the header element of each note, but otherwise haven't modified the example code. I've also tried without these modifications and still get the same issue.
Also, I tried the Ovide web app and the issue doesn't occur in the Ovide editor. So my thoughts are perhaps there's some missing code in this repo? For instance, maybe cleanUncitedNotes in https://github.com/peritext/ovide/blob/14ee5be5cf5a896c5f0e5c58dc4245a08bf21fd4/app/src/helpers/assetsUtils.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions