droppable icon indicating copy to clipboard operation
droppable copied to clipboard

ie11 / Win7 - upload click does not work

Open mousemke opened this issue 5 years ago • 4 comments

this is about the clickable area. it was a button my case, but i was able top reproduce this in the droppable demo site.

drag and drop works fine, but i am unable to click any clickable areas to upload a file.

i actually fixed this in my own project by moving away from droppable (sorry ^^). the fix is that the clickable area needs to be a label linking (htmlFor => id) to the file upload input component. then the click on the button styled label will trigger the native upload input

mousemke avatar Mar 05 '19 17:03 mousemke

ie11 in windows 7, but not ie11 in windows 10. this was also confirmed by the fact that both of these ie11s had different version numbers

mousemke avatar Mar 05 '19 17:03 mousemke

Aha. Will fix this as soon as I can.

Thanks!

lifenautjoe avatar Mar 09 '19 12:03 lifenautjoe

Actually, not sure how to fix this.

Introducing an html element dynamically on the website would probably break layout/css of existing webpages.

Will try some things.

lifenautjoe avatar Mar 09 '19 13:03 lifenautjoe

what i ened up doing (button from material ui, but you could just as easily just use a label

      <div
        ref={el => (this.dropTargetField = el)}
        className={`${classes.dropTarget} ${className ? className : ''}`}
      >
        <div className={classes.content}>
          <input
            type="file"
            multiple
            id={`dropTarget-label-button-${dropTargetStrings.length}`}
            className={classes.hiddenInput}
            onChange={e => this.processDroppedFile([...e.target.files])}
          />
          <Button
            label={buttonText}
            fullWidth
            component="label"
            htmlFor={`dropTarget-label-button-${dropTargetStrings.length}`}
            variant={buttonVariant}
          >
            {buttonText}
          </Button>
          {children || null}
        </div>
        <div className={classes.dropMask}>
          <div className={classes.dropMaskText}>
              {dropMaskText}
          </div>
        </div>
      </div>

mousemke avatar Mar 09 '19 13:03 mousemke