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

Line number is not right on pull request files view #31149

Closed
lunny opened this issue May 29, 2024 · 0 comments · Fixed by #31431
Closed

Line number is not right on pull request files view #31149

lunny opened this issue May 29, 2024 · 0 comments · Fixed by #31431
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@lunny
Copy link
Member

lunny commented May 29, 2024

https://demo.gitea.com/lunny/changelog/pulls/85/files#diff-cf73bbc31f478dbb894254b062c6cccf1502f0ff

Click on the left up arraw, the line number is not right.

image
@lunny lunny added type/bug topic/ui Change the appearance of the Gitea UI labels May 29, 2024
@wxiaoguang wxiaoguang added this to the 1.22.1 milestone Jun 20, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Jun 20, 2024
silverwind pushed a commit that referenced this issue Jun 20, 2024
…31431) (#31440)

Backport #31431 by @charles7668

close #31149

The problem is caused by the `data-query=` string affecting the parsing
of the `last_left` parameter. When the page is first rendered,
`data-query=` does not exist. However, after clicking expand, the
returned HTML contains this string, causing the line numbers to start
from 1 upon expanding a second time.

before fix

![圖片](https://github.com/go-gitea/gitea/assets/30816317/36842bde-cc30-43ba-91b0-c60a50a6dc0f)

after fix

![圖片](https://github.com/go-gitea/gitea/assets/30816317/b73d7e40-ec01-48ae-9992-09c19ee477ad)

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 18, 2024
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.

2 participants