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

168
Vistas
contenteditable moves the cursor outside the block

if you place another html block with the contenteditable="false" attribute in the contenteditable block, then the cursor moves outside the block as shown in the screenshot.

enter image description here

Try to start removing the word "remove" in the example. And the cursor will go beyond the block. Is it possible to solve this problem?

http://jsfiddle.net/weckdjp4/

.test-block {
  display: inline-block;
  height: 30px;
  border: 1px solid red;
  padding: 2px;
}

.content {
  width: 80%;
  border: 1px solid #CCC;
  padding: 10px;
}
<div class="content" contenteditable="true" id="test">hi <div class="test-block" contenteditable="false">test</div>remove</div>

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

0

Add box-sizing: border-box; to .content:

.content {
  width: 80%;
  border: 1px solid #CCC;
  padding: 10px;
  box-sizing: border-box;
}
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