commit: 4a956fa18df73c1aa4d01cfe3008a512682d2b62
parent 4d720974c385042d558bee4ac8b6dccf57cb347f
Author: Henry Jameson <me@hjkos.com>
Date: Mon, 9 May 2022 23:07:55 +0300
fix hidden input for file upload causing unintended scrolls
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue
@@ -17,9 +17,9 @@
/>
<input
v-if="uploadReady"
+ class="hidden-input-file"
:disabled="disabled"
type="file"
- style="position: fixed; top: -100em; max-width: 0; max-height: 0"
multiple="true"
@change="change"
>
@@ -33,5 +33,12 @@
.media-upload {
cursor: pointer; // We use <label> for interactivity... i wonder if it's fine
+
+ .hidden-input-file {
+ max-width: 0;
+ max-height: 0;
+ pointer-events: none;
+ opacity: 0;
+ }
}
</style>