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

Fix editor display and amendment #4411

Open
Elblinator opened this issue Nov 27, 2024 · 4 comments
Open

Fix editor display and amendment #4411

Elblinator opened this issue Nov 27, 2024 · 4 comments
Labels
Milestone

Comments

@Elblinator
Copy link
Member

Elblinator commented Nov 27, 2024

Describe the bug
B. If you create an amendment on an empty paragraph and this amendment has exactly two words then an additional line is added by this amendment

How to Reproduce
Example for the motion text

<p>A A A</p>
<p>
</p>
<p>C C C</p>

B)

  1. Create a motion with an empty paragraph (see above)
  2. Add an amendment on the empty paragraph (here line 2) which adds exactly two words
  3. The amendment adds not only your new two words but also an additional line in the presentation
    Example for the amendment:
<p>BB BB</p>

Expected behavior
B) The amendment should only add the two words and not add a new line

@Elblinator Elblinator added this to the 4.2 milestone Nov 27, 2024
@reiterl
Copy link
Member

reiterl commented Nov 27, 2024

To A) I see, that the 'p' tags has large margin-top and margin-bottom values. I could fix that. But for some reason there is a br tag in the empty paragraph with class ProseMirror-trailingBreak in it. This seems to cause the main problem. It is a problem with tiptap/ProseMirror.

@reiterl reiterl self-assigned this Nov 27, 2024
@reiterl
Copy link
Member

reiterl commented Nov 27, 2024

To B) I think, I can reproduce the failure.

@reiterl reiterl removed their assignment Nov 28, 2024
@Elblinator Elblinator self-assigned this Nov 28, 2024
@Elblinator
Copy link
Member Author

To B)
This specific scenario produces broken html (To find the trail search diffDetectBrokenDiffHtml() in code)
I would recommend fixing this in it's own issue documented in our big Meta-Diff-Issue: #2956

@Elblinator Elblinator removed the staging label Dec 2, 2024
@Elblinator Elblinator removed their assignment Dec 2, 2024
@Elblinator
Copy link
Member Author

Case A was fixed:
I'll move Case A to the comments

Description:
A. If you have one empty paragraph in the editor then the height of this empty paragraph is too big
Repo:
A)

  1. Open an editor
  2. Add Text which has an empty paragraph
  3. The empty paragraph has too much height
    Example for the text
<p>A A A</p>
<p>
</p>
<p>C C C</p>

Expected behavior
A) An empty paragraph should have the same height as the otther paragraphs (which are only one line long)

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

No branches or pull requests

2 participants