From 4a956fa18df73c1aa4d01cfe3008a512682d2b62 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 9 May 2022 23:07:55 +0300
Subject: fix hidden input for file upload causing unintended scrolls

---
 src/components/media_upload/media_upload.vue | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'src/components/media_upload/media_upload.vue')

diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue
index 2668a34f..56f67d35 100644
--- 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>
-- 
cgit v1.2.3-70-g09d2

