I am trying to detect focusin a child of an element contenteditablefor the purpose of stylish CSS styling. (I know I can detect this with JS, add an extra class and do it this way, but it takes so long.)
Basically, I have something like:
<div contenteditable="true">
Some text <span class="edit">that</span> goes here.
</div>
I tried CSS line by line:
.edit:focus {
color: #FF0000;
}
I want the spancolor to change when the carriage enters it, but apparently the focus only applies to divthat set to contenteditable, and not to any child element. I tried applying the second contenteditableto span, but besides being a terribly sloppy approach, it still doesn't work.
Is there a solution for this?