fix: fix shortcut help dialog not keyboard-scrollable (#1508)

fixes #1473
This commit is contained in:
Nolan Lawson 2019-09-21 13:42:56 -07:00 committed by GitHub
parent 489319a3a6
commit 3a71f2f8d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,6 @@
<div class="shortcut-help-info {inDialog ? 'in-dialog' : ''}">
<div class="shortcut-help-info {inDialog ? 'in-dialog' : ''}"
tabindex="{inDialog ? '0' : '-1'}"
>
<!-- Svelte makes this file kind of ridiculously large for a static page (~17kB),
so just use raw HTML here to make it smaller -->
{@html `
@ -44,12 +46,14 @@
`}
</div>
<style>
.shortcut-help-info {
overflow-y: scroll;
.shortcut-help-info.in-dialog {
overflow-y: auto;
}
.shortcut-help-info.in-dialog:not(:focus) {
scrollbar-width: none;
-ms-overflow-style: none;
}
.shortcut-help-info::-webkit-scrollbar {
.shortcut-help-info.in-dialog:not(:focus)::-webkit-scrollbar {
display: none;
}
:global(.shortcut-help-info li) {