coordsAtPos always returning (0, 0, 0, 0)

Hi,

I am encountering a weird issue where coordsAtPos always returns a rectangle with all coordinates set to 0. I’m testing this method in jest, so I was wondering if this could be due to the fact that we do not display anything on screen (I don’t know if that’s relevant here).

Probably, yes—the editor queries the browser DOM layout, and if it’s not in the DOM and visible you won’t be able to do layout queries.