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

Modalwrapper styles break when toggling a checkbox at the bottom of a large content #7340

Closed
2 tasks done
albertmir opened this issue Nov 24, 2020 · 4 comments
Closed
2 tasks done

Comments

@albertmir
Copy link

albertmir commented Nov 24, 2020

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you're having.

When we have a <ModalWrapper> with a lot of content inside and a checkbox at the bottom of scroll position, styles break if we toggle the checkbox state.

Is this issue related to a specific component?

  • ModalWrapper
  • Checkbox

What did you expect to happen? What happened instead? What would you like to
see changed?

  • Modal header, body and footer should remain at the same expected place.

What browser are you working in?

Google Chrome for Mac: v87.0.4280.67

What version of the Carbon Design System are you using?

  • carbon-components": "10.24.0"
  • carbon-components-react": "7.24.0"

Steps to reproduce the issue

  1. Create a <ModalWrapper>
  2. Add enough content inside to scroll, for example, some paragraphs.
  3. Right after the content, place a <Checkbox>
  4. In your site, launch the modal and scroll down to the bottom
  5. Click on the checbkox to toggle the state
  6. Modal styles will break

CodeSandbox demo

Additional information

  • Screenshots:
    image
@tw15egan
Copy link
Member

Very weird, wonder if Chrome changed something in the latest release?

Here is v86 where I was unable to reproduce
modal

But after updating to v87, I am seeing the same issue.

@albertmir
Copy link
Author

albertmir commented Nov 25, 2020

Indeed @tw15egan. I did many tests (even with Chrome Canary and Microsoft Edge) and the issue appears in versions >= 87.

@edurocher
Copy link

edurocher commented Nov 25, 2020

Yes we had many related problems with Chrome 87 too! It seems indeed that something changed in Chrome with absolute positioned elements... Adding this rule solved it for us:

.bx--checkbox, .bx--radio-button, .bx--visually-hidden {
  left: -999px;
}

I tried this using the Chrome dev tools on your example, it seems to fix your problem too.

@tw15egan
Copy link
Member

tw15egan commented Feb 4, 2021

Looks like this was resolved in the latest release 7.28.0/10.28.0 (via #7698)

Updated Example: https://codesandbox.io/s/distracted-sun-o1u1o?file=/index.js

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

No branches or pull requests

3 participants