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

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