Fix text insertion bug.
This commit is contained in:
parent
584b40f58a
commit
9bb2476a2c
@ -85,7 +85,7 @@ Upvotes =
|
|||||||
{com} = QR.nodes
|
{com} = QR.nodes
|
||||||
text = "#{Upvotes.textPosted}\n"
|
text = "#{Upvotes.textPosted}\n"
|
||||||
pos = com.selectionStart
|
pos = com.selectionStart
|
||||||
com.value = com.value[..pos] + text + com.value[pos...]
|
com.value = com.value[...pos] + text + com.value[pos..]
|
||||||
pos += text.length
|
pos += text.length
|
||||||
com.setSelectionRange pos, pos
|
com.setSelectionRange pos, pos
|
||||||
$.event 'input', null, com
|
$.event 'input', null, com
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user