Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

218
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda