You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wxiaoguang affdd40296
Make issue title edit buttons focusable and fix incorrect ajax requests (#22807)
Replace #19922 , which is stale since my last review:
https://github.com/go-gitea/gitea/pull/19922#pullrequestreview-1003546506
and https://github.com/go-gitea/gitea/pull/19922#issuecomment-1153181546

Close #19769

Changes:
1. Use `<button>` instead of `<div>` for buttons
2. Prevent default event handler in `initGlobalButtonClickOnEnter`
3. Fix the incorrect call to `pullrequest_targetbranch_change`
4. Add a slight margin-left to the input element to make UI look better

The logic in repo-issue.js is not ideal, but this PR isn't going to
touch the logic.

This is also an example for future developers to understand how to make
buttons work properly.

### Before


![image](https://user-images.githubusercontent.com/2114189/217262515-ec0462f7-7051-46a5-bfa2-2f6c6a807b7d.png)

### After

* Add a slight margin-left.
* The `Cancel` button is focused.


![image](https://user-images.githubusercontent.com/2114189/217264891-934c9c8d-d190-4866-98b5-666cea57e28d.png)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 year ago
..
actions Fix more HTMLURL in templates (#22831) 1 year ago
branch Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
cite Copy citation file content, in APA and BibTex format, on repo home page (#19999) 2 years ago
diff Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
editor Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
find Add main landmark to templates and adjust titles (#22670) 1 year ago
graph Rename almost all Ctx functions (#22071) 2 years ago
issue Make issue title edit buttons focusable and fix incorrect ajax requests (#22807) 1 year ago
migrate Add main landmark to templates and adjust titles (#22670) 1 year ago
projects Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
pulls Add main landmark to templates and adjust titles (#22670) 1 year ago
release Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
settings Add main landmark to templates and adjust titles (#22670) 1 year ago
wiki Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
activity.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
blame.tmpl Show syntax lexer name in file view/blame (#21814) 2 years ago
branch_dropdown.tmpl Fix branch dropdown shifting on page load (#21428) 2 years ago
clone_buttons.tmpl Rework repo buttons (#20602) 2 years ago
clone_script.tmpl Make clone URL use current page's host (#22808) 1 year ago
commit_page.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
commit_status.tmpl Change commit status icons to SVG (#20736) 2 years ago
commit_statuses.tmpl Fixes accessibility of empty repository commit status (#22632) 1 year ago
commits.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
commits_list.tmpl Change `commits-table` column width (#21564) 2 years ago
commits_list_small.tmpl Add whitespace removal inside template curly brackes (#20853) 2 years ago
commits_table.tmpl Add whitespace removal inside template curly brackes (#20853) 2 years ago
create.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
create_helper.tmpl Add templates to customize text when creating and migrating repositories 1 year ago
empty.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
file_info.tmpl Show syntax lexer name in file view/blame (#21814) 2 years ago
forks.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
graph.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
header.tmpl Use link in UI which returned a relative url but not html_url which contains an absolute url (#21986) 1 year ago
home.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
icon.tmpl Do not display org avatar near icon for internal repos (#13957) 4 years ago
packages.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
search.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago
shabox_badge.tmpl Refactor `i18n` to `locale` (#20153) 2 years ago
sub_menu.tmpl Render number of commits in repo page in a user friendly way (#21786) 2 years ago
unicode_escape_prompt.tmpl Switch Unicode Escaping to a VSCode-like system (#19990) 2 years ago
upload.tmpl Refactor `i18n` to `locale` (#20153) 2 years ago
user_cards.tmpl Localize all timestamps (#21440) 2 years ago
view_file.tmpl Fix links for the menus in the view file page (#22795) 1 year ago
view_list.tmpl Add whitespace removal inside template curly brackes (#20853) 2 years ago
watchers.tmpl Add main landmark to templates and adjust titles (#22670) 1 year ago