fix this https://watchpeopledie.tv/h/meta/post/61549/megathread-for-bugs-and-suggestions/1987050#context
parent
412a032166
commit
75b9448c73
|
@ -450,6 +450,7 @@ else {
|
|||
}
|
||||
|
||||
function insertText(input, text) {
|
||||
if (input.value) text = ` ${text}`
|
||||
const newPos = input.selectionStart + text.length;
|
||||
input.setRangeText(text);
|
||||
|
||||
|
|
|
@ -6,13 +6,7 @@ let commentFormID;
|
|||
|
||||
function insertGIF(url) {
|
||||
const commentBox = document.getElementById(commentFormID);
|
||||
const old = commentBox.value;
|
||||
let text
|
||||
|
||||
if (old) text = `${old}\n${url}`;
|
||||
else text = url
|
||||
|
||||
insertText(commentBox, text)
|
||||
insertText(commentBox, url)
|
||||
}
|
||||
|
||||
const gifModal = document.getElementById('gifModal')
|
||||
|
|
Loading…
Reference in New Issue