How get line / position of click on mobile?

If i use the this.registerDomEvent(document, 'click', (evt: MouseEvent) => {

how can I from the evt get the line number of the click? I don’t understand how to go from DOM element to obsidian document line.

On desktop I used called editor.getCursor() method but couldn’t get it to work on mobile.

Help please!

It’s undocumented but try BaseEditor | Obsidian Typings

Great, this worked. Would never have found it without your help.

(unfortunately I solved this step but stumbled upon another discrepancy between desktop and mobile, but that’s a topic for another thread)

1 Like

The link here gives a 404 now… (in the post marked Solution)
https://fevol.github.io/obsidian-typings-website/api/namespaces/internals/interfaces/baseeditor/#posatmouse

Found it:
https://fevol.github.io/obsidian-typings/api/namespaces/internals/interfaces/baseeditor/#posatmouse