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
chrome bugfix: cursor at end in pre-wrap
[peach-html5-editor.git]
/
editor.coffee
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