diff --git a/src/css/style.css b/src/css/style.css index e603d3b9..24817793 100755 --- a/src/css/style.css +++ b/src/css/style.css @@ -336,6 +336,9 @@ a.historyLink:hover { cursor: pointer; margin: 0 10px 0 -3px; } +.icon-minus-squared-alt ~ .groupLink { + visibility: visible; +} .sessionContents div:last-child { padding-bottom: 10px; } diff --git a/src/js/history.js b/src/js/history.js index 23c7e361..72a84e2c 100644 --- a/src/js/history.js +++ b/src/js/history.js @@ -120,6 +120,12 @@ element.onclick = func; } } + + function addKeyDownListenerToElement (element, func) { + if (element) { + element.onkeydown = func; + } + } function createSessionElement(session) { var sessionEl = historyItems.createSessionHtml(session, true); @@ -130,6 +136,14 @@ toggleSession(sessionEl, session.sessionId); //async. unhandled promise } ); + addKeyDownListenerToElement( + sessionEl.getElementsByClassName('sessionIcon')[0], + function(event) { + if(event.keyCode === 13) { + toggleSession(sessionEl, session.sessionId); //async. unhandled promise + } + } + ); addClickListenerToElement( sessionEl.getElementsByClassName('sessionLink')[0], function() { diff --git a/src/js/historyItems.js b/src/js/historyItems.js index 973a1c03..40ba0f7b 100644 --- a/src/js/historyItems.js +++ b/src/js/historyItems.js @@ -57,6 +57,7 @@ var historyItems = (function(global) { sessionIcon = createEl('i', { class: 'sessionIcon icon icon-plus-squared-alt', + tabindex: 0 }); sessionDiv = createEl('div', {