Delete your auto-resize textarea script

The CSS property field-sizing: content replaces your auto-resize textarea script. One line, no input listener, no scrollHeight. Plus the limits to set.