diff --git a/dev/Styles/User/Shortcuts.less b/dev/Styles/User/Shortcuts.less index f8f3e0bd7..682ced1d3 100644 --- a/dev/Styles/User/Shortcuts.less +++ b/dev/Styles/User/Shortcuts.less @@ -6,4 +6,8 @@ td[class^="icon-"] { display: table-cell; } + + .tab-content { + grid-column-end: 6; + } } diff --git a/dev/View/Popup/KeyboardShortcutsHelp.js b/dev/View/Popup/KeyboardShortcutsHelp.js index 644b5c1b7..bb208b478 100644 --- a/dev/View/Popup/KeyboardShortcutsHelp.js +++ b/dev/View/Popup/KeyboardShortcutsHelp.js @@ -9,25 +9,8 @@ export class KeyboardShortcutsHelpPopupView extends AbstractViewPopup { } onBuild(dom) { - const tabs = dom.querySelectorAll('.nav.nav-tabs > li'), - last = tabs.length - 1, - show = tab => { - if (!tab.classList.contains('active')) { - const previous = tab.parentElement.querySelector('.active'); - previous.classList.remove('active'); - dom.querySelector(previous.firstElementChild.getAttribute('href')).classList.remove('active'); - - tab.classList.add('active'); - dom.querySelector(tab.firstElementChild.getAttribute('href')).classList.add('active'); - } - }; - - tabs.forEach(node => { - node.addEventListener('click', e => { - e.preventDefault(); - show(node); - }); - }); + const tabs = dom.querySelectorAll('.tabs input'), + last = tabs.length - 1; // shortcuts.add('tab', 'shift', shortcuts.add('tab,arrowleft,arrowright', '', @@ -35,7 +18,7 @@ export class KeyboardShortcutsHelpPopupView extends AbstractViewPopup { event => { let next = 0; tabs.forEach((node, index) => { - if (node.matches('.active')) { + if (node.matches(':checked')) { if (['Tab','ArrowRight'].includes(event.key)) { next = index < last ? index+1 : 0; } else { @@ -43,8 +26,7 @@ export class KeyboardShortcutsHelpPopupView extends AbstractViewPopup { } } }); - - show(tabs[next]); + tabs[next].checked = true; return false; } ); diff --git a/snappymail/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html b/snappymail/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html index 92ffee0cd..d13e3a931 100644 --- a/snappymail/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html +++ b/snappymail/v/0.0.0/app/templates/Views/Common/PopupsKeyboardShortcutsHelp.html @@ -4,23 +4,19 @@