Is it possible to use the caretPosition to find the location of the cursor in a text field through a relation?
caretPosition is a property of an element placed on a form and can be accessed like “forms.formname.elements.elementname.caretPosition”. This applies to all elements on your form, it doesn’t matter if their dataprovider is related or not.
So if your question is if you can access the caretposition of related fields, the answer is “yes”.