From: Jason Woofenden Date: Tue, 2 Feb 2016 05:22:18 +0000 (-0500) Subject: tweak cursor placement test span X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=commitdiff_plain;h=33e750fec2426e7ab0f7f02d2d1cf76a3bf7091b tweak cursor placement test span --- diff --git a/editor.coffee b/editor.coffee index cde553d..defecba 100644 --- a/editor.coffee +++ b/editor.coffee @@ -34,7 +34,7 @@ get_el_offset = (el) -> # implementation: insert a span tag where we want the cursor, and ask the # browser where it put that span cursor_to_loc = (n, i) -> - span = domify span: style: "height: 1em; width: 0", children: [domify text: "|"] + span = domify span: style: "height: 1em; border-left: 1px solid black; margin-left: -1px" parent = n.el.parentNode if i is 0 # cursor at start of text