File tree 2 files changed +8
-7
lines changed
templates/repo/issue/view_content
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 10
10
{{else}}
11
11
{{$referenceUrl = Printf "%s/files#%s" .ctx.Issue.Link .item.HashTag}}
12
12
{{end}}
13
- <a class="item context" data-clipboard-text-type="url" data-clipboard-text="{{AppSubUrl}}{{$referenceUrl}}">{{.ctx.locale.Tr "repo.issues.context.copy_link"}}</a >
14
- <a class="item context quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.HashTag}}-raw">{{.ctx.locale.Tr "repo.issues.context.quote_reply"}}</a >
13
+ <div class="item context js-aria-clickable " data-clipboard-text-type="url" data-clipboard-text="{{AppSubUrl}}{{$referenceUrl}}">{{.ctx.locale.Tr "repo.issues.context.copy_link"}}</div >
14
+ <div class="item context js-aria-clickable quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.HashTag}}-raw">{{.ctx.locale.Tr "repo.issues.context.quote_reply"}}</div >
15
15
{{if not .ctx.UnitIssuesGlobalDisabled}}
16
- <a class="item context reference-issue" data-target="{{.item.HashTag}}-raw" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{.ctx.locale.Tr "repo.issues.context.reference_issue"}}</a >
16
+ <div class="item context js-aria-clickable reference-issue" data-target="{{.item.HashTag}}-raw" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{.ctx.locale.Tr "repo.issues.context.reference_issue"}}</div >
17
17
{{end}}
18
18
{{if or .ctx.Permission.IsAdmin .IsCommentPoster .ctx.HasIssuesOrPullsWritePermission}}
19
19
<div class="divider"></div>
20
- <a class="item context edit-content">{{.ctx.locale.Tr "repo.issues.context.edit"}}</a >
20
+ <div class="item context js-aria-clickable edit-content">{{.ctx.locale.Tr "repo.issues.context.edit"}}</div >
21
21
{{if .delete}}
22
- <a class="item context delete-comment" data-comment-id={{.item.HashTag}} data-url="{{.ctx.RepoLink}}/comments/{{.item.ID}}/delete" data-locale="{{.ctx.locale.Tr "repo.issues.delete_comment_confirm"}}">{{.ctx.locale.Tr "repo.issues.context.delete"}}</a >
22
+ <div class="item context js-aria-clickable delete-comment" data-comment-id={{.item.HashTag}} data-url="{{.ctx.RepoLink}}/comments/{{.item.ID}}/delete" data-locale="{{.ctx.locale.Tr "repo.issues.delete_comment_confirm"}}">{{.ctx.locale.Tr "repo.issues.context.delete"}}</div >
23
23
{{end}}
24
24
{{end}}
25
25
</div>
Original file line number Diff line number Diff line change @@ -83,8 +83,9 @@ function attachOneDropdownAria($dropdown) {
83
83
if ( e . key === 'Enter' ) {
84
84
let $item = $dropdown . dropdown ( 'get item' , $dropdown . dropdown ( 'get value' ) ) ;
85
85
if ( ! $item ) $item = $menu . find ( '> .item.selected' ) ; // when dropdown filters items by input, there is no "value", so query the "selected" item
86
- // if the selected item is clickable, then trigger the click event. in the future there could be a special CSS class for it.
87
- if ( $item && $item . is ( 'a' ) ) $item [ 0 ] . click ( ) ;
86
+ // if the selected item is clickable, then trigger the click event.
87
+ // we can not click any item without check, because Fomantic code might also handle the Enter event. that would result in double click.
88
+ if ( $item && ( $item . is ( 'a' ) || $item . is ( '.js-aria-clickable' ) ) ) $item [ 0 ] . click ( ) ;
88
89
}
89
90
} ) ;
90
91
You can’t perform that action at this time.
0 commit comments