Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

Cutting and pasting items in an unordered list results in misplaced items

Open stromfeldt opened this issue 1 year ago • 3 comments

Issue Summary

When trying to cut and then paste an item from an unordered list to a different spot in the list, said item gets placed at the very bottom of the list.

https://github.com/TryGhost/Ghost/assets/27488257/18666d54-7c1f-4b67-8591-388e2f15ec97

Steps to Reproduce

  1. Create several items in an unordered list
  2. Cut one of those items
  3. Go to another spot in the middle of the list and paste that item in
  4. See it gets placed at the bottom of the list

Ghost Version

5.68

Node.js Version

Yes

How did you install Ghost?

Ghost(Pro)

Database type

MySQL 5.7

Browser & OS version

Firefox 118.0.2, macOS 13.6

Relevant log / error output

No response

Code of Conduct

  • [X] I agree to be friendly and polite to people in this repository

stromfeldt avatar Oct 15 '23 05:10 stromfeldt

Thanks for the report. This is an upstream issue that we're aware of and tracking.

kevinansfield avatar Oct 16 '23 07:10 kevinansfield

Our bot has automatically marked this issue as stale because there has not been any activity here in some time.

The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR.

We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂

github-actions[bot] avatar Feb 13 '24 08:02 github-actions[bot]

This seems to persist even after resolving the upstream issue (Lexical had some very major changes to how nodes were inserted). The behaviour upstream isn't perfect as it still injects an empty ListItem node when using Shift+Up selection to not just grab the text... but it at least doesn't dump it at the end of the list like Koenig does, so we've got something to look in to at this point.

Edit: upstream issue https://github.com/facebook/lexical/issues/5124 is what's described here. We still have something in Koenig to update to prevent dumping the pasted content at the end of the list.

9larsons avatar Feb 15 '24 17:02 9larsons

Our bot has automatically marked this issue as stale because there has not been any activity here in some time.

The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR.

We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂

github-actions[bot] avatar Jun 14 '24 17:06 github-actions[bot]