Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
aa6e784
)
fix typo/crash in chrome for empty text nodes
author
Jason Woofenden
<jason@jasonwoof.com>
Tue, 8 Mar 2016 17:30:45 +0000
(12:30 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Tue, 8 Mar 2016 17:30:45 +0000
(12:30 -0500)
editor.coffee
patch
|
blob
|
history
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