EditorGUIUtility.GetStateObject does not catch information about given element

I tried the code included in this answer with no luck. The given ControlID seems right but the editor variable does not contain information about the TextEditor that has focus.

_target.text = EditorGUILayout.TextArea(_target.text, style);

// Get the cursor's position
TextEditor editor = (TextEditor)EditorGUIUtility.GetStateObject(typeof(TextEditor), EditorGUIUtility.keyboardControl);

// Debug infos
EditorGUILayout.LabelField (EditorGUIUtility.keyboardControl + "  ::  " + editor.graphicalCursorPos + editor.SelectedText);

Hi again! Unfortunately the main difference here between the EditorGUI and GUI versions of TextArea is that the EditorGUI variant uses a subclass, RecycledTextEditor. As the name implies, this is a statically allocated TextEditor that is re-used throughout the Editor GUI loop.