Nested lists with BiDi text rendering dir #14749

Open
opened 2025-11-02 11:21:58 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @alirezaalavi87 on GitHub (Jul 12, 2025).

Description

Rendering a nested list with mixed BiDi content results in wrong rendering.

Why?

Because the attribute dir="auto" is added to every <ul> element. but it should only be added to the top level ul and the rest shouldn't have it.

Screenshots

This is how this text renders:

Image

but by removing dir="auto" from child

    elements, it gets fixed:

    Image

    By "fixed" I mean the hierarchy is readable and usable.

    Gitea Version

    1.23.5

    Can you reproduce the bug on the Gitea demo site?

    Yes

    Operating System

    Arch Linux

    Browser Version

    Firefox developer edition 141

Originally created by @alirezaalavi87 on GitHub (Jul 12, 2025). ### Description Rendering a nested list with mixed BiDi content results in wrong rendering. ## Why? Because the attribute `dir="auto"` is added to every `<ul>` element. but it should only be added to the top level `ul` and the rest shouldn't have it. ### Screenshots This is how this text renders: <img width="1013" height="728" alt="Image" src="https://github.com/user-attachments/assets/82e5c33a-abd3-4449-8b16-15847caa587c" /> but by removing `dir="auto"` from child <ul> elements, it gets fixed: <img width="1006" height="746" alt="Image" src="https://github.com/user-attachments/assets/6cbca645-fc8f-4e51-94c2-09bb02442b11" /> By "fixed" I mean the hierarchy is readable and usable. ### Gitea Version 1.23.5 ### Can you reproduce the bug on the Gitea demo site? Yes ### Operating System Arch Linux ### Browser Version Firefox developer edition 141
GiteaMirror added the topic/uitype/bug labels 2025-11-02 11:21:58 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14749