diff options
author | HEREYUA <37935145+HEREYUA@users.noreply.github.com> | 2024-03-27 15:20:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-27 15:20:10 +0800 |
commit | 1261dd6742fb7095e51c173ca4641477d81a3634 (patch) | |
tree | 743c6d272c6aa38be550234ea9f3ff5a7d707e3e /templates/repo/issue | |
parent | ce3c3512265df3b4940672be40065c4fb415ef95 (diff) | |
download | gitea-1261dd6742fb7095e51c173ca4641477d81a3634.tar.gz gitea-1261dd6742fb7095e51c173ca4641477d81a3634.zip |
When the title in the issue has a value, set the text cursor at the end of the text. (#30090)
Fix: [#25055](https://github.com/go-gitea/gitea/issues/25055)
Before
![image](https://github.com/go-gitea/gitea/assets/37935145/1b89cd7b-4fa3-49aa-9b5e-a8413add436e)
After
![image](https://github.com/go-gitea/gitea/assets/37935145/fa808f8d-d3ce-4245-a4fe-dd0282ba3fdf)
ps: I've noticed that we are gradually replacing jQuery, so I didn't use jQuery here.
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/new_form.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index 058ea8d73e..88a6c39e52 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -9,7 +9,7 @@ {{ctx.AvatarUtils.Avatar .SignedUser 40}} <div class="ui segment content tw-my-0"> <div class="field"> - <input name="title" id="issue_title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" autofocus required maxlength="255" autocomplete="off"> + <input name="title" class="js-autofocus-end" id="issue_title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" required maxlength="255" autocomplete="off"> {{if .PageIsComparePull}} <div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0)}}</div> {{end}} |