From 00bf27939604f546a220c70917d469c9654dd30a Mon Sep 17 00:00:00 2001 From: rr- Date: Thu, 14 Apr 2016 20:24:22 +0200 Subject: [PATCH] client/views: fix access key underline --- client/js/views/top_nav_view.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/js/views/top_nav_view.js b/client/js/views/top_nav_view.js index 2369553a..6fa4c8a2 100644 --- a/client/js/views/top_nav_view.js +++ b/client/js/views/top_nav_view.js @@ -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, '$1'); }