[Bug]: [TextArea] : Exceeding maxCount Word Limit by Pressing Enter Key #16892
Labels
component: text-area
role: dev 🤖
severity: 2
User cannot complete task, and/or no workaround
type: bug 🐛
Package
@carbon/react
Browser
Chrome
Package version
v1.60.3
React version
18.02
Description
When the
maxCount
word limit is set along withenableCounter
prop , users can bypass this limit by pressing theEnter
key, allowing them to enter more words than specified in the next/new line.Screen.Recording.2024-06-28.at.15.38.58.mov
Reproduction/example
https://react.carbondesignsystem.com/?path=/story/components-textarea--playground&args=maxCount:5;counterMode:word
Steps to reproduce
Vist textArea playground storybook
Enable
enableCounter
propSet
counterMode
toword
Set
maxCount
to 5Type 5 words; observe that you cannot press space to write a new word.
Press Enter; notice you can now enter new words, exceeding the word limit.
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: