-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Context: JavaScriptIssue is in JavaScriptIssue is in JavaScriptPackage: ModalRole: DevDevelopment/engineering skills neededDevelopment/engineering skills needed
Milestone
Description
In storybook we have a right padding set on body. When modal checks for body.style.paddingRight we get an empty string. This causes a visual regression where the incorrect padding is set and then removed all together.
Related code
uswds/packages/usa-modal/src/index.js
Lines 129 to 132 in aceec33
| body.style.paddingRight = | |
| body.style.paddingRight === TEMPORARY_PADDING | |
| ? INITIAL_PADDING | |
| : TEMPORARY_PADDING; |
Examples
Steps to reproduce
- Go to default modal example in develop.
- Resize browser to
400px. - Confirm
16pxpadding on right side. - Open and close modal.
- Confirm right padding is now gone.
Additional context
Originally found when testing PR #5315.
Metadata
Metadata
Assignees
Labels
Context: JavaScriptIssue is in JavaScriptIssue is in JavaScriptPackage: ModalRole: DevDevelopment/engineering skills neededDevelopment/engineering skills needed
Type
Projects
Status
Done