Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix typo/crash in chrome for empty text nodes
[peach-html5-editor.git]
/
editor.coffee
diff --git
a/editor.coffee
b/editor.coffee
index
ceffb9a
..
45e5f36
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-98,7
+98,7
@@
window.cursor_to_xyh = cursor_to_xyh = (n, i) ->
range = document.createRange()
if n.text.length is 0
ret = text_range_bounds n.el, 0, 0
- if i is n.text.length
+ else if i is n.text.length
ret = text_range_bounds n.el, i - 1, i
if ret?
ret.x += ret.w