Thank you for publishing this library. It has inspired me and others to pick up the work and update it to handle more browsers and corner cases. The result was even simpler code that offers pixel precision for returning the (x, y) caret position. There are no known bugs.
Kindly take a look at textarea-caret-position. Should you find the solution superior, we'd appreciate a deprecation notice in your README.