Skip to content

Commit

Permalink
add keyboard support (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesytim authored Feb 9, 2021
1 parent fbb1eea commit dc28fc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/qComponents/QUpload/src/QUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
<div
class="q-upload-drag"
:class="classes"
tabindex="0"
@dragenter.prevent
@drop.prevent="processFile"
@dragover.prevent="handleDragover"
@dragleave.prevent="isDragover = false"
@click="handleUploadClick"
@keyup.enter="handleUploadClick"
>
<span
class="q-upload-drag__icon"
Expand All @@ -21,6 +23,7 @@
class="q-upload__input"
type="file"
:accept="accept.toString()"
tabindex="-1"
@change="processFile"
/>

Expand Down
3 changes: 2 additions & 1 deletion src/qComponents/QUpload/src/q-upload.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
box-shadow: var(--box-shadow);
cursor: pointer;

&:hover {
&:hover,
&[data-focus-visible-added] {
--background-color: var(--color-tertiary-gray);
--box-shadow: var(--box-shadow-hover);
}
Expand Down

0 comments on commit dc28fc7

Please sign in to comment.