Updated findxy to find the current cursor position without using the doc...

...toral thesis

A fix for the firefox issue mentioned in #1