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

106
Views
En contenteditable, pierdo oyente tras un movimiento de una selección

En un div editable, cuando selecciono una oración dentro de un elemento con oyentes y muevo la oración a otro lugar, pierdo estos oyentes.

Sabes por qué ?

https://jsfiddle.net/er069bsj/

 <div contenteditable=true> If you move by selection this sentence "LOREM <span id="1" class="element" onmouseover="console.log('mouseover word 1');this.style.backgroundColor='yellow'" onmouseout="console.log('mouseout word 1');this.style.backgroundColor='red'">WORD 1</span>FINIBUS", you lose the listener.<br> Other example with this sentence "NNULLAM <span id="2" class="element" onmouseout="console.log('mouseout word 2');this.style.backgroundColor='red'">WORD 2</span>METUS".

Por ejemplo, puede mover la oración LOREM WORD 1 FINIBUS en mi ejemplo de Fiddle y puede ver que el mouseover y el mouseout no funcionan después del movimiento.

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!