X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=editor.coffee;h=45e5f364ddd629b391711d540491769f4a5cbc25;hb=01d1661cb1c3d11720ddbf1337b0b51d83152fdc;hp=ceffb9a3b88b804c79e87aab0bcb58983edf8bd7;hpb=aa6e7840ed72af2ded70181409c8fdd0e5b75e48;p=peach-html5-editor.git diff --git a/editor.coffee b/editor.coffee index ceffb9a..45e5f36 100644 --- 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