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

Widget decoration causes node duplication when typing dead-letters #1289

Closed
tommoor opened this issue Jun 25, 2022 · 3 comments
Closed

Widget decoration causes node duplication when typing dead-letters #1289

tommoor opened this issue Jun 25, 2022 · 3 comments

Comments

@tommoor
Copy link

tommoor commented Jun 25, 2022

Bug

I have a widget decoration that is only rendered next to empty paragraphs, when a character is typed the decoration is removed. (For context, It acts as a button to insert content into empty lines).

When typing a diacritic using a dead-letter it results in duplication of the line below. Something about the DOM diffing is not accounting for this case perhaps?

Reproduction

  • Open remix: https://elegant-periwinkle-thursday.glitch.me/
  • Insert a new line at the top and see the widget appear
  • Type a dead letter as the first character in the empty paragraph (On macOS you can use Option+I)
  • The line below duplicates

A video of the above behavior, note that typing the dead-letter in a position other than the first character in the paragraph does not reproduce:

Kapture.2022-06-25.at.11.44.36.mp4
@marijnh
Copy link
Member

marijnh commented Jul 6, 2022

Which browser does this happen in?

@tommoor
Copy link
Author

tommoor commented Jul 6, 2022

Hey @marijnh – so far I know this has been reproduced in both latest Chrome on macOS (by me), and Firefox on Linux (by original reporter in our application).

@marijnh
Copy link
Member

marijnh commented Jul 6, 2022

Oh, right, I can reproduce it now. Continued typing before, and didn't notice, due to the layout shifting, that the duplicated paragraph immediately vanished again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants