Fixes #7056 - only resize textarea in params tab.

also, take into consideration the padding to prevent unneeded scrolling.
nitpick, the function name no longer fits the purpose