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

React CodeSnippet doesn't update right overflow indicator on resize #8441

Closed
1 of 2 tasks
TimonLukas opened this issue Apr 16, 2021 · 0 comments · Fixed by #9605
Closed
1 of 2 tasks

React CodeSnippet doesn't update right overflow indicator on resize #8441

TimonLukas opened this issue Apr 16, 2021 · 0 comments · Fixed by #9605

Comments

@TimonLukas
Copy link

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

It's possible to get the CodeSnippet component into a "wrong" state by scrolling it to the very right (making the right overflow indicator disappear), and then resizing the snippet (e.g. by resizing the browser window) so that the snippet isn't fully scrolled to the right anymore. The indicator should appear again, and I think there is even code in there that should make this work, but it doesn't.

Steps to reproduce the issue

  1. Open the Code Snippet singleline
  2. Scroll the snippet to the very right, making the indicator disappear
  3. Resize the browser window so the snippet gets smaller, e.g. by increasing the size of the dev tools
  4. See that the indicator doesn't reappear

Additional information

See the hard cutoff on the right:
image

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