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

TextArea Component error text is not removed when error is fixed #6392

Closed
dabrad26 opened this issue Jul 6, 2020 · 10 comments · Fixed by #6394
Closed

TextArea Component error text is not removed when error is fixed #6392

dabrad26 opened this issue Jul 6, 2020 · 10 comments · Fixed by #6394
Assignees

Comments

@dabrad26
Copy link
Member

dabrad26 commented Jul 6, 2020

What package(s) are you using?

  • [X ] carbon-components
  • [X ] carbon-components-react

Detailed description

Error text under TextArea is not removed when normal text is placed back on top of it (helper text).

Screen Shot 2020-07-03 at 11 59 36 AM

"carbon-components": "^10.14.0",
"carbon-components-react": "^7.14.0",

Steps to reproduce the issue

  1. Have TextArea required
  2. make error happen (focus/blur)
  3. Add text to clear error
  4. see red and regular text

Aspera

@tw15egan
Copy link
Collaborator

tw15egan commented Jul 6, 2020

Could you link to a reproducible example on code sandbox?

@dabrad26
Copy link
Member Author

dabrad26 commented Jul 6, 2020

I tried... But the CodeSandbox keeps saying:

Warning: React does not recognize the `helperText` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `helpertext` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

https://codesandbox.io/s/carbon-components-react-8ssn2?file=/src/index.js

@dabrad26
Copy link
Member Author

dabrad26 commented Jul 6, 2020

@tw15egan
Copy link
Collaborator

tw15egan commented Jul 6, 2020

Hmm, I'm able to get it working and not able to see any issues. Could possibly be a local style issue?

https://codesandbox.io/s/carbon-components-react-x39gr?file=/src/index.js

@dabrad26
Copy link
Member Author

dabrad26 commented Jul 6, 2020

Here is a working case:

https://codesandbox.io/s/carbon-components-react-jrehw?file=/src/index.js

It shows the error. Type more than 20 chars and then see the error, backspace and the error should clear but the text is still there.

@tw15egan
Copy link
Collaborator

tw15egan commented Jul 6, 2020

I'm still not able to reproduce the error...

textarea-error

@dabrad26
Copy link
Member Author

dabrad26 commented Jul 6, 2020

Maybe try Safari? Maybe it is a specific browser bug. I am using latest Safari which should be supported by carbon so I assume it is already in your test flow.

@tw15egan
Copy link
Collaborator

tw15egan commented Jul 6, 2020

Ahh, that's it, seems like it's a safari-only bug. Seems like the state value is doing something strange in the browser, because if you click into the code editor when both texts show up, the error text disappears after a few seconds

@dabrad26
Copy link
Member Author

dabrad26 commented Jul 6, 2020

Yeah. I noticed if you do something to cause safari to alter the draw like change tabs or move window it will cause it to update. Not sure if just safari. We mostly test on safari since it’s the most problematic for Mac.

Maybe if the entire text wrapper was 100% or had something to trick safari intro redrawing the area might fix it.

@tw15egan
Copy link
Collaborator

tw15egan commented Jul 6, 2020

It seems like if I set bx--form__helper-text to width: 100% it resolves the issue 🤔

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

Successfully merging a pull request may close this issue.

2 participants