diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-03 16:16:39 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-03 16:16:39 +0200 |
| commit | 6d1d801925f4546cc16b56759f5108733fd548ba (patch) | |
| tree | 66b94e354050f219abacad8970ad39d01c6b4780 | |
| parent | 71e73684c5c9efe4302fc7f406eef785d9713449 (diff) | |
library: Fix TypeError: variable _ redeclares argument
| -rw-r--r-- | lib/caret.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/caret.js b/lib/caret.js index 758600d0..017e96f3 100644 --- a/lib/caret.js +++ b/lib/caret.js @@ -31,10 +31,10 @@ function($) { return range2.text.length; } //textarea - var pos = 0, - range = target.createTextRange(), + var range = target.createTextRange(), range2 = document.selection.createRange().duplicate(), bookmark = range2.getBookmark(); + pos = 0; range.moveToBookmark(bookmark); while (range.moveStart('character', -1) !== 0) pos++; return pos; |
