diff --git a/README.md b/README.md
index 7f56cf8..24e1612 100644
--- a/README.md
+++ b/README.md
@@ -43,8 +43,8 @@ or the [test.html](http://rawgit.com/component/textarea-caret-position/master/te
var getCaretCoordinates = require('textarea-caret');
document.querySelector('textarea').addEventListener('input', function () {
- var coordinates = getCaretCoordinates(this, this.selectionEnd);
- console.log('(top, left, height) = (%s, %s, %s)', coordinates.top, coordinates.left, coordinates.height);
+ var caret = getCaretCoordinates(this, this.selectionEnd);
+ console.log('(top, left, height) = (%s, %s, %s)', caret.top, caret.left, caret.height);
})
```
@@ -64,8 +64,11 @@ The function returns a caret coordinates object of the form `{top: , left: , hei
## Known issues
+* Edge cases with spaces at the end of lines in `
<input type="text">
-
+
+
+
+
+
+
+
<input> manual tests
+
+
Type text longer than the input, select with the mouse from right to left to cause scrolling left, then click in the input.
+
+
+
<textarea>
-
- I threw a wish in the well,
- Don't ask me, I'll never tell
- PlaceTheCursorUnderTheFirstLettersOfThisLineAndMakeSureItDoesntTrailOnThePreviousLine
- I looked to you as it fell,
+
+
+ 1. Place cursor before "T" below
+ Then press arrow dow'n
+ 2.PressHomeOnThisLineThenLeftArrow
+ Firefox fails, #sorrow
And now you're in my way
And tabs are handled just fine
Except in IE9.
- I'd trade my soul for a wish,
- Pennies and dimes for a kiss
- I wasn't looking for this,
+ 3. I'd trade my soul for averylongwordthatgetswrappedaway,
+ Press End on line 3
+ All browsers are faili'n,
But now you're in my way
Your stare was holdin',
@@ -51,7 +63,16 @@
<textarea>
And this is crazy,
But here's my number,
So call me, maybe!
-
+
+
+
<textarea> manual tests
+
+
Place the cursor before the "T" in "Then" then press arrow down. Fails in Chrome 58, Firefox 53.
+
Place the cursor before "2." and press left arrow. Fails in Firefox 53, works in Chrome.
+
Place the cursor at the beginning of line "3." then press End. Fails in Chrome 58, Firefox 53.