Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Firefox: Is it possible to paste an image not into contenteditable div?

I have a chat with textArea in which user can write text and send images. User can send image by pushing ctrl+v while textArea is focused. In "onPress" i can just do this

    const {files, types} = event.clipboardData;
    if (files.length > 0) {
        event.preventDefault();
        this.props.onPasteFile(event.clipboardData.files[0]);
        return;
    }

And it works fine everywhere except Firefox 96.0.3 (Win10) and latest Firefox on Linux Mint. In these browsers event.clipboardData.files is empty. However, if you do the same, but instead of textArea use div with contenteditable=true, the event.clipboardData.files array will contain the image. When dragging the image, it is also always available inside event.clipboardData.files. So my question is:

How do i get the image from clipboard in onPress event of textArea on Firefox?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!