So, I have a situation with two contenteditable divs nested within another:
<div class="top" contenteditable="true">
<div class="nested" contenteditable="true">This</div>
</div>
If you want to see an example, check out this Fiddle.
When the top div is focused, the 'nested' div should also be focused. However, when checking with
console.log(document.activeElement);
, it shows that the top div is focused and doesn't recognize the nested div.
In situations where content is being edited, it's crucial to identify the nested div element instead of the top element.
How can this be achieved? Any assistance would be greatly appreciated.