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

313
Vistas
Contenteditable div - cannot delete inner HTML nodes with backspace

I'm trying to implement mentions within contenteditable div. I'm using external library called TributeJS (https://github.com/zurb/tribute). Mostly it is working fine, but there is an edge case if I write mentions together without space and in multiple lines and then try to delete them with backspace key, then at some point I cannot delete mentions anymore.

Mentions inside input use span with contenteditable="false" like this:

<span contenteditable="false" class="mention" data-id="user1">
  @<label class="mention-label">User 1</label>
</span>

I've recorded a video, so I can explain the problem easier: https://files.fm/f/ga5dak22b

And I've also created a Codepen to reproduce this issue: https://codepen.io/tilenhosnar/pen/powZqBw

This problem occurs for me in Chrome browser. I'm wondering if there is any way to "force" delete child HTML nodes in contenteditable div on backspace key? I've pretty much tried every solution I could find in the last few days but it is still happening.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Maybe try to use ANSI escape code to go up a line instead of backspace, This question might help you.

about 4 years ago · Juan Pablo Isaza Denunciar
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