Support Article

Issue with max allowed characters of text area

SA-10876

Summary



You have a text area field with a maximum allowable character limit. When entering a newline character, it itakes up two characters in IE 8. This can be verified by typing to the maximum character limit and inserting a new line in the middle. Two trailing characters are removed rather than one.

Error Messages



Not Applicable.

Steps to Reproduce

  1. Configure a text area with a maximum size of 20 and also configure it to show the remaining character count.
  2. Enter 20 characters (maximum allowable characters).
  3. Enter a line break at the middle of the characters. It should delete two trailing characters.

Root Cause



The root cause of this problem is the newline is being interpreted by the browser as '\r\n' and counted as two characters. 

Resolution



The newline is being interpreted by the browser as '\r\n' and counted as two characters. Thus, when you enter a new line character, it takes up two characters.
Suggest Edit

Published July 9, 2015 - Updated October 8, 2020


0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.