When attempting to utilize the cols and rows attributes of the <textarea>
element in order to set the width and height in characters, I have encountered issues even without implementing CSS.
Take a look at this example: link
I have configured a 5x5 text area, yet I am able to type 7 characters in the first row instead of the desired 5.
The height appears to be correct as only 5 visible lines are displayed.
However, once I exceed the character limit for the visible area, a vertical scrollbar is presented, resulting in the first row containing only 4 characters.
Is there a solution to restrict it to a maximum of 5 characters? Perhaps through the use of a third-party component or by detecting when the scrollbar appears and adjusting the width accordingly?