While the div is focused, spell checking is enabled which works well. However, once the focus is removed and there are spelling mistakes, the red squiggle lines for spell checking remain visible.
After following the advice provided in this query:
spellcheck=false on contentEditable elements
I implemented event listeners for the blur and focus events to switch between edit.spellcheck = false;
and edit.spellcheck = true;
in an attempt to prevent the appearance of red squiggle lines when the div is not in focus. Unfortunately, the issue persists despite these changes.
.edit {
border: 1px solid gray;
}
<div class="edit" contenteditable="true"></div>