Skip to content

fix(cdk/a11y): visually hidden element affecting scrolling #24620

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/cdk/a11y/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
// Avoid some cases where the browser will still render the native controls (see #9049).
-webkit-appearance: none;
-moz-appearance: none;

// We need at least one of top/bottom/left/right in order to prevent cases where the
// absolute-positioned element is pushed down and can affect scrolling (see #24597).
// `left` was chosen here, because it's the least likely to break overrides where the
// element might have been positioned (e.g. `mat-checkbox`).
left: 0;

[dir='rtl'] & {
left: auto;
right: 0;
}
}
}

Expand Down