I'm trying to find a reliable way to find out if the slate editor is currenty focused or not. The editor should be in a focused state even when nested elements are selected.
I've tried
ReactEditor.isFocused(editor)
But am seing really inconsistent results. Often this will yield true
even if the editor is not selected. Also, no rerender seems to be triggered when the editor focus changes.
Is there a reliable way to do this?