Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to delete the first character of an italicised word deletes the HTML card below the paragraph #18632

Closed
1 task done
stromfeldt opened this issue Oct 15, 2023 · 0 comments · Fixed by #18644
Closed
1 task done
Assignees
Labels
affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly

Comments

@stromfeldt
Copy link
Contributor

Issue Summary

I've had this situation occur a couple of times now, the first occurrence of which I wasn't quite clear what was going on. But having this happen again I've been able to isolate the issue and reproduce it.

That is, trying to delete the first character of an italicised word ends up deleting the HTML card below. The bug apparently doesn't occur when trying to delete any other character of the word, nor when trying to do a backspace on the final or any other character of the word. In the video below I'm hitting the delete key, then CTRL-Z, delete, CTRL-Z.

disappearing-HTML-card.mov

Steps to Reproduce

  1. Create a paragraph and italicise one of the words in the middle
  2. Create an HTML card below the paragraph
  3. Move the cursor before the italicised word and hit the delete key
  4. See the HTML card disappear

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

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Oct 15, 2023
@daniellockyer daniellockyer added bug [triage] something behaving unexpectedly affects:editor Work relating to the Koenig Editor labels Oct 16, 2023
@github-actions github-actions bot removed the needs:triage [triage] this needs to be triaged by the Ghost team label Oct 16, 2023
@kevinansfield kevinansfield self-assigned this Oct 16, 2023
kevinansfield added a commit to kevinansfield/Koenig that referenced this issue Oct 16, 2023
… at beginning of some formatted text

refs TryGhost/Ghost#18632

- the "end of node" detection for text selections was too eager and was detecting "end of node" when at the end of the current text node even if that was mid-paragraph due to the next node being a new formatted text node
- updated it to check that we're at the end of the current text node and the current text node is at the end of the parent element node
kevinansfield added a commit to TryGhost/Koenig that referenced this issue Oct 16, 2023
… at beginning of some formatted text (#998)

refs TryGhost/Ghost#18632

- the "end of node" detection for text selections was too eager and was detecting "end of node" when at the end of the current text node even if that was mid-paragraph due to the next node being a new formatted text node
- updated it to check that we're at the end of the current text node and the current text node is at the end of the parent element node
kevinansfield added a commit to kevinansfield/Ghost that referenced this issue Oct 16, 2023
… at beginning of some formatted text

closes TryGhost#18632

- bumps `@tryghost/koenig-lexical` to version containing the delete behaviour fix
kevinansfield added a commit that referenced this issue Oct 16, 2023
… at beginning of some formatted text (#18644)

closes #18632

- bumps `@tryghost/koenig-lexical` to version containing the delete behaviour fix
kevinansfield added a commit that referenced this issue Oct 16, 2023
… at beginning of some formatted text

closes #18632

- bumps `@tryghost/koenig-lexical` to version containing the delete behaviour fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly
Projects
None yet
3 participants