lobby: show focus hint only with keyboard navigation (tab)
This commit is contained in:
parent
8cb2ed72bb
commit
d807032ace
2 changed files with 24 additions and 3 deletions
|
|
@ -61,6 +61,9 @@ var callbacks = module.exports = {
|
|||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
ipc.send('sessionOpen',{path:$(this).data('session')})
|
||||
}).on('mousedown touchstart', function(e){
|
||||
e.preventDefault()
|
||||
$(this).blur()
|
||||
})
|
||||
|
||||
if (!READ_ONLY) {
|
||||
|
|
@ -71,16 +74,22 @@ var callbacks = module.exports = {
|
|||
$(this).parents('a').remove()
|
||||
})
|
||||
|
||||
footer.append('<a class="btn browse">'+icon('folder-open')+' Browse</a>')
|
||||
footer.append('<a class="btn new">'+icon('file-o')+' New</a>')
|
||||
footer.append('<a href="#" tabindex="0" class="btn browse">'+icon('folder-open')+' Browse</a>')
|
||||
footer.append('<a href="#" tabindex="0" class="btn new">'+icon('file-o')+' New</a>')
|
||||
|
||||
lobby.find('.browse').click(function(e){
|
||||
e.stopPropagation()
|
||||
actions.sessionBrowse()
|
||||
}).on('mousedown touchstart', function(e){
|
||||
e.preventDefault()
|
||||
$(this).blur()
|
||||
})
|
||||
lobby.find('.new').click(function(e){
|
||||
e.stopPropagation()
|
||||
module.exports.sessionNew()
|
||||
}).on('mousedown touchstart', function(e){
|
||||
e.preventDefault()
|
||||
$(this).blur()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,19 @@ body {
|
|||
flex-grow: 0;
|
||||
border-top:2rem solid var(--color-bg);
|
||||
a {
|
||||
background:var(--color-raised)
|
||||
background:var(--color-raised);
|
||||
&:focus {
|
||||
&:after {
|
||||
content:"";
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:0;
|
||||
border:1rem solid var(--color-accent);
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
a {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue