lobby: hide links focus state unless tab key is hit

This commit is contained in:
jean-emmanuel 2018-01-19 20:20:39 +01:00
parent e8e9ed6843
commit 8d54f54869
2 changed files with 8 additions and 4 deletions

View file

@ -97,7 +97,6 @@ var SessionManager = class SessionManager {
lobby.list.addEventListener('click', function(e){
e.preventDefault()
e.target.blur()
if (e.target.hasAttribute('data-session')) {
ipc.send('sessionOpen',{path:e.target.getAttribute('data-session')})
} else if (!READ_ONLY && e.target.tagName == 'span') {
@ -112,17 +111,20 @@ var SessionManager = class SessionManager {
var nws = lobby.footer.appendChild(DOM.create('<a href="#" tabindex="0" class="btn new">'+icon('file')+' New</a>'))
brw.addEventListener('click', (e)=>{
e.preventDefault()
this.browse()
})
nws.addEventListener('click', (e)=>{
e.preventDefault()
this.create()
})
}
DOM.addEventListener(lobby.list, 'mousedown touchstart', function(e){
if (e.type == 'mousedown') e.preventDefault()
e.target.blur()
})
lobby.open()
}

View file

@ -185,7 +185,9 @@ body {
text-overflow: ellipsis;
background: none;
border-bottom:1rem solid var(--color-bg);
em {
pointer-events: none;
}
&:last-child {
border-bottom:0;
}