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

If an issue and one of its comments shares the same internal ID, then Gitea generates a duplicated html id in the issue view #21965

Closed
fsologureng opened this issue Nov 28, 2022 · 1 comment · Fixed by #21966
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@fsologureng
Copy link
Contributor

fsologureng commented Nov 28, 2022

Description

When a new Gitea instance is recently created, the first issue created and its, eventually, first comment (for example when the first instance comment goes to the first instance issue) shares the same internal ID, then the HTML created to that issue keeps a duplicated html ID for both objects.

this hidden element id collisionate with the id of this another hidden element generated here. The former is the raw content of the issue and the latter the raw content of the comment. This situation only occurs if both the issue and the comment internal ID shares the same page. In others words, if a comment shares the same internal ID with their issue, situation common with new issues over new instances.

Screenshots

image

image

image

Gitea Version

1.19.0+dev-112-g6fb168141

Can you reproduce the bug on the Gitea demo site?

No

Operating System

No response

Browser Version

Firefox 107.0

@fsologureng
Copy link
Contributor Author

Here is an example of the bug: if you do "Quote reply" to the linked comment (2nd in the list), you will got the text of the issue itself (first comment in the list) as quote in the editor.

fsologureng added a commit to fsologureng/gitea that referenced this issue Dec 9, 2022
wxiaoguang pushed a commit that referenced this issue Dec 9, 2022
Implement differentiation to html id for issue raw content container.

Fixes #21965
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant