title: preventDefault is not a function error when trying to pass an image
body: <p>I'm using an image cropper to crop an image. I'm using the following library</p>
  
  <p><a href="https://github.com/mosch/react-avatar-editor" rel="nofollow noreferrer">https://github.com/mosch/react-avatar-editor</a></p>
  
  <p>I have implemented this correctly and i'm getting the cropped image using this function.</p>
  
  <pre><code>handleSave = () =&gt; {
    const img = this.editor.getImageScaledToCanvas().toDataURL();
  
    this.props.croppedImage(img);
  };
  </code></pre>
  
  <p>Here i have passed the cropped image using props to another function as follows</p>
  
  <pre><code>this.props.croppedImage(img);
  </code></pre>
  
  <p>This is where i have implemented the cropper (2nd component)</p>
  
  <pre><code>&lt;CropperTest croppedImage={this.getCroppedImg}/&gt;
  </code></pre>
  
  <p>In the 2nd component i have used this function to access the cropped image and again pass that image to another function. This is where i get the issue.</p>
  
  <pre><code>getCroppedImg(img) {
      this.props.onImageImgPoll(img);
  }
  </code></pre>
  
  <p><strong>onImageImgPoll function</strong></p>
  
  <pre><code>onImageImgPoll(event) {
  
  event.preventDefault();
  let array = this.state.filepoll.slice();
  let unq_file = event.target.files[0];
  
  if (event.target.files &amp;&amp; event.target.files[0]) {
  
    let reader = new FileReader();
    reader.onloadend = (e) =&gt; {
      array.push(unq_file);
    };
    reader.readAsDataURL(unq_file);
  
    this.setState({
      image: event.target.result,
      filepoll: array,
      filestar: []
    });
  
  }
  
  };
  </code></pre>
  
  <p>When running this code i'm getting this error</p>
  
  <pre><code>event.preventDefault is not a function
  </code></pre>
  
  <p>What I've found out is the cropped image is in base64 format. Maybe that might be the issue. How can i solve this?</p>