Ghost
Ghost copied to clipboard
Cutting and pasting items in an unordered list results in misplaced items
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
- Create several items in an unordered list
- Cut one of those items
- Go to another spot in the middle of the list and paste that item in
- 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
Thanks for the report. This is an upstream issue that we're aware of and tracking.
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 🙂
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.
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 🙂