Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: [TextArea] : Exceeding maxCount Word Limit by Pressing Enter Key #16892

Closed
2 tasks done
2nikhiltom opened this issue Jun 28, 2024 · 0 comments · Fixed by #16893
Closed
2 tasks done

[Bug]: [TextArea] : Exceeding maxCount Word Limit by Pressing Enter Key #16892

2nikhiltom opened this issue Jun 28, 2024 · 0 comments · Fixed by #16893

Comments

@2nikhiltom
Copy link
Contributor

2nikhiltom commented Jun 28, 2024

Package

@carbon/react

Browser

Chrome

Package version

v1.60.3

React version

18.02

Description

When the maxCount word limit is set along with enableCounter prop , users can bypass this limit by pressing the Enter 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 prop
Set counterMode to word
Set maxCount to 5
Type 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant