Updated findxy to find the current cursor position without using the document size

A fix for the firefox issue mentioned in #1
Merge pull request #2 from matforest/patch-1

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