I'm building a Chrome extension that enables the user to insert canned responses into Youtube comments on their channel. I insert the text using textarea
's value property:
getHighlightedComment().querySelector("textarea").value = cannedResponseText
The problem is, the textarea
doesn't adapt its size and the submit button doesn't get enabled until I type in another letter manually.
I have a different extension installed that has a similar functionality that doesn't have these problems, so it must be possible.
I already tried sending keypress
/keydown
/keyup
events manually, but they seem to not work inside textarea
s. Nothing happens in response to them.