Fix text insertion bug.

This commit is contained in:
ccd0 2016-03-31 16:00:28 -07:00
parent 584b40f58a
commit 9bb2476a2c

View File

@ -85,7 +85,7 @@ Upvotes =
{com} = QR.nodes
text = "#{Upvotes.textPosted}\n"
pos = com.selectionStart
com.value = com.value[..pos] + text + com.value[pos...]
com.value = com.value[...pos] + text + com.value[pos..]
pos += text.length
com.setSelectionRange pos, pos
$.event 'input', null, com