Skip to content

Commit

Permalink
chore: Add comment to modal body scrolling (#2215)
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-kot committed May 2, 2024
1 parent 4bb4d54 commit d24a84c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modal/body-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import styles from './styles.css.js';
import { browserScrollbarSize } from '../internal/utils/browser-scrollbar-size';

// Read this before making changes to the code below.
//
// When a modal is used from an iframe the body scrolling utils take no effect because they need to be applied to another document.
// The customers replicate this behavior by running the same code on the correct document instance, see AWSUI-41915.
// Hence, we should avoid making changes to the component that break the body scrolling logic in its current form.

let initialBodyPaddingRightStyle: string | undefined = undefined;

export function disableBodyScrolling() {
Expand Down

0 comments on commit d24a84c

Please sign in to comment.