Skip to content

Commit 5f999d8

Browse files
committed
Properly markup buttons as buttons
The only downside I observed is that cancel button accepts only space keys. Using return will execute the logic twice for whatever reason and thus yields in no visible change. Signed-off-by: André Jaenisch <[email protected]>
1 parent 9e9699b commit 5f999d8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

templates/repo/issue/view_title.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</h1>
1515
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
1616
<div class="edit-buttons">
17-
<div id="cancel-edit-title" class="ui basic secondary in-edit button" style="display: none" tabindex="0">{{.i18n.Tr "repo.issues.cancel"}}</div>
18-
<div id="save-edit-title" class="ui primary in-edit button" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}} tabindex="0">{{.i18n.Tr "repo.issues.save"}}</div>
17+
<button id="cancel-edit-title" class="ui basic secondary in-edit button" style="display: none" type="button">{{.i18n.Tr "repo.issues.cancel"}}</button>
18+
<button id="save-edit-title" class="ui primary in-edit button" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title" {{if .Issue.IsPull}}data-target-update-url="{{$.RepoLink}}/pull/{{.Issue.Index}}/target_branch"{{end}} type="button">{{.i18n.Tr "repo.issues.save"}}</button>
1919
</div>
2020
{{end}}
2121
</div>

web_src/less/_base.less

+7
Original file line numberDiff line numberDiff line change
@@ -1816,6 +1816,13 @@ a.ui.label:hover {
18161816
.ui.basic.secondary.buttons .button:active,
18171817
.ui.basic.secondary.button:active {
18181818
color: var(--color-secondary-dark-8) !important;
1819+
border-color: var(--color-secondary-dark-4) !important;
1820+
}
1821+
1822+
.ui.basic.secondary.button:focus,
1823+
.ui.basic.secondary.buttons .button:focus {
1824+
color: var(--color-secondary-dark-8) !important;
1825+
border-color: var(--color-secondary-dark-6) !important;
18191826
}
18201827

18211828
.ui.primary.label,

0 commit comments

Comments
 (0)