Sfoglia il codice sorgente

DragDrop: don’t use the whole DnD area as a click target for now

Artur Paikin 7 anni fa
parent
commit
82d9eeee84
3 ha cambiato i file con 3 aggiunte e 4 eliminazioni
  1. 2 2
      src/plugins/DragDrop/index.js
  2. 1 1
      src/scss/_dragdrop.scss
  3. 0 1
      src/scss/_statusbar.scss

+ 2 - 2
src/plugins/DragDrop/index.js

@@ -103,6 +103,7 @@ module.exports = class DragDrop extends Plugin {
   }
 
   handleBrowseClick (ev) {
+    ev.stopPropagation()
     this.input.click()
   }
 
@@ -113,7 +114,7 @@ module.exports = class DragDrop extends Plugin {
       height: this.opts.height
     }
     return (
-      <div class={DragDropClass} style={DragDropStyle} onclick={this.handleBrowseClick}>
+      <div class={DragDropClass} style={DragDropStyle}>
         <div class="uppy-DragDrop-inner">
           <svg aria-hidden="true" class="UppyIcon uppy-DragDrop-arrow" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
             <path d="M11 10V0H5v10H2l6 6 6-6h-3zm0 0" fill-rule="evenodd" />
@@ -122,7 +123,6 @@ module.exports = class DragDrop extends Plugin {
             type="file"
             name="files[]"
             multiple="true"
-            value=""
             ref={(input) => {
               this.input = input
             }}

+ 1 - 1
src/scss/_dragdrop.scss

@@ -6,7 +6,7 @@
     justify-content: center;
     border-radius: 7px;
     background-color: $color-white;
-    cursor: pointer;
+    // cursor: pointer;
   }
   
   .uppy-DragDrop-inner {

+ 0 - 1
src/scss/_statusbar.scss

@@ -60,7 +60,6 @@
 }
 
 .uppy-StatusBar-content {
-  font-weight: 400;
   position: relative;
   z-index: $zIndex-3;
   padding-left: 15px;