client/views: fix access key underline
This commit is contained in:
parent
35c549493c
commit
00bf279396
1 changed files with 3 additions and 2 deletions
|
@ -13,10 +13,11 @@ class TopNavView {
|
|||
const target = this.navHolder;
|
||||
const source = this.template(ctx);
|
||||
|
||||
for (let link of source.querySelectorAll('a span.text')) {
|
||||
for (let link of source.querySelectorAll('a')) {
|
||||
const regex = new RegExp(
|
||||
'(' + link.getAttribute('accesskey') + ')', 'i');
|
||||
link.innerHTML = link.textContent.replace(
|
||||
const span = link.querySelector('span.text');
|
||||
span.innerHTML = span.textContent.replace(
|
||||
regex,
|
||||
'<span class="access-key" data-accesskey="$1">$1</span>');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue