In Chrome, the bottom right of <textarea>
fields can be pulled to expand the text area. This has its advantages sometimes, but sometimes, it does not. (This discussion is for another time.)
What I want to know is how I can block this behaviour, if possible. I’m thinking something along the lines of some JS/jQuery dingus, but I don’t really know how Google programmed the feature.
Has anyone dabbled with this?
Have you tried using CSS yet to stop this?
textarea {
resize: none;
}
That should disable the drag-to-expand feature.
Update
You could also set this programmatically by using jQuery:
// CSS
textarea.no-expand {
resize: none;
}
// jQuery
$('#my-text-area').addClass('no-expand');
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With