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 (parent:
c5c3490
)
chrome bugfix: cursor at end in pre-wrap
author
Jason Woofenden
<jason@jasonwoof.com>
Sun, 20 Mar 2016 00:52:04 +0000
(20:52 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Sun, 20 Mar 2016 00:52:04 +0000
(20:52 -0400)
editor.coffee
patch
|
blob
|
history
diff --git
a/editor.coffee
b/editor.coffee
index
e32d662
..
7c57510
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-121,7
+121,13
@@
text_range_bounds = (el, start, end) ->
range.setEnd el, end
rects = range.getClientRects()
if rects.length > 0
range.setEnd el, end
rects = range.getClientRects()
if rects.length > 0
- rect = rects[0]
+ if rects.length > 1
+ if rects[1].width > rects[0].width
+ rect = rects[1]
+ else
+ rect = rects[0]
+ else
+ rect = rects[0]
else
return null
doc = el.ownerDocument.documentElement
else
return null
doc = el.ownerDocument.documentElement