How can I blur/focusout a div where contentEditable=true? I have attempted $(elm).blur() and $(elm).attr(\'contentEditable\', false);
$(elm).blur()
$(elm).attr(\'contentEditable\', false);
I would add another solution that is based on Omnicon's answer which is correct BTW. I have forked his fiddle and updated it.
The trick is to remove all ranges after calling blur:
$(".editable").blur(); window.getSelection().removeAllRanges();