Benjol / SE-AutoReviewComments

AutoReviewComments - Pro-forma comments for SE
http://stackapps.com/q/2116
98 stars 39 forks source link

Trigger "input" event upon insertion of text #180

Closed codygray closed 1 year ago

codygray commented 4 years ago

Changing the .val() property programmatically does not trigger either the "input" or "change" events (see references below). Both of these require actual user engagement. Normally, that behavior may make sense, but I have a userscript that hooks into this event to automatically resize the textarea control to accommodate its entire contents. This script is not compatible with AutoReviewComments unless AutoReviewComments triggers one of these events.

Therefore, this change triggers an "input" event whenever the Markdown is added to the targetObject (i.e., the textarea).

References: