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

105
Vistas
Where data for auto-create caret tag in designMode/contenteditable

I have created tag b and am typing characters in it.
I then remove characters with backspace.
The tag b disappears from the DOM tree.
Then I press any character and the tag b reappears.

Question: where is the information that a tag will appear when a key is pressed?

UPD: minimal reproducible example:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>doc</title>
</head>
<body>
<pre style='font-family: "Times";'>
    <div class="editor">Delete and create <b>Blod</b></div>
    <div class="editor">Delete and create <b>Blod</b><div>After element.</div></div>
</pre>
<script>
    document.designMode = "on";
    document.body.spellcheck = false;
</script>
</body>
</html>

You need to look at the DOM tree. I also noticed an inadequate reaction if there is an element next.

Sreenshots example

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