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

[Bug] Bullet and numbered lists display spaces and placeholder text if no content exists, but include child nodes #802

Open
d-kuen opened this issue May 17, 2024 · 0 comments

Comments

@d-kuen
Copy link

d-kuen commented May 17, 2024

Bug Description

Bullet and numbered lists are not rendered correctly if a list element doesn't contain any content but contains child nodes like a paragraph.

If no bullet or numbered list content exists, an empty space and a placeholder text will be displayed:
image

How to Reproduce

Following minimal HTML produces a document which will be rendered as explained above:

htmlToDocument('<ol><li><p>test</p></li></ol>')

Extended example (used for the screenshot):

htmlToDocument('<ol><li><p>ol Line 1</p><p>ol Line 2</p></li><li><p>ol Line 3</p><p>ol Line 4</p></li></ol><ul><li><p>ul Line 1</p><p>ul Line 2</p></li><li><p>ul Line 3</p><p>ul Line 4</p></li></ul>')

This can be reproduced by replacing the HTML string at

final html = htmlToDocument(htmlString);
.

Expected Behavior

No empty space and no placeholder text should be displayed in this case.
The nested content should move up to be aligned with the bullet symbol:

image

Maybe only in editable: false mode?

Operating System

iOS (simulator)

AppFlowy Editor Version(s)

2.4.0

Screenshots

No response

Additional Context

No response

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

1 participant