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

Writer field: fix content with non-breaking space #6562

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

distantnative
Copy link
Member

@distantnative distantnative commented Jul 22, 2024

Description

Summary of changes

Enforcing conversion of a non-breaking space to   as this is what ProseMirror internally will do automatically. And if the backend delivers the actual non-breaking space character but ProseMirror converts it to &nbsp: we have an unreasonable state where the current input value can never be the original value (and thus always shows as changed).

Changelog

Fixes

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add changes & docs to release notes draft in Notion

@distantnative distantnative added the type: bug 🐛 Is a bug; fixes a bug label Jul 22, 2024
@distantnative distantnative added this to the 4.4.0 milestone Jul 22, 2024
@distantnative distantnative self-assigned this Jul 22, 2024
@distantnative distantnative linked an issue Jul 22, 2024 that may be closed by this pull request
@distantnative distantnative marked this pull request as ready for review July 22, 2024 15:13
@distantnative distantnative requested review from a team July 22, 2024 15:13
@bastianallgeier
Copy link
Member

bastianallgeier commented Jul 23, 2024

Is there a good process to reproduce this issue? I'm trying to add non-breaking spaces, but I never really run into the issue myself on develop-minor. The fix looks good to me. I just really would love to see the difference IRL first :)

@distantnative
Copy link
Member Author

@bastianallgeier this #6285 (comment) worked reliably for me. I added a text with a &nbsp: to the default template and copied it from there.

Copy link
Member

@bastianallgeier bastianallgeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing me to that comment. I was also able to reproduce it and the fix works great.

@bastianallgeier bastianallgeier merged commit 097e08b into develop-minor Jul 24, 2024
12 checks passed
@bastianallgeier bastianallgeier deleted the fix/6285-writer-non-breaking-space branch July 24, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writer: non-breaking spaces cause endless "Revert" state
2 participants