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

Application shifts when pressing 'Page Down' in a textarea inside mat-sidenav-content when mat-sidenav[position] is set to "end" #17863

Open
joerideg opened this issue Dec 3, 2019 · 1 comment
Labels
area: material/sidenav P4 A relatively minor issue that is not relevant to core functions

Comments

@joerideg
Copy link

joerideg commented Dec 3, 2019

Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-material-breaking-sidenav

Steps to reproduce:

  1. focus on the textarea
  2. press PgDn button

Expected Behavior

User scrolls a page down inside the text area

Actual Behavior

Application shifts left

Environment

  • Angular: 8.2.14
  • CDK/Material: 8.2.3
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10, Linux (Ubuntu/Linux Mint)

When pressing 'Page Down' in a textarea inside mat-sidenav-content when mat-sidenav[position] is set to "end" will shift the application left visually. Using mat-sidenav[position="start"] the behavior is fine. I've also noticed the amount of shift seems to be related to the number of characters on the line the cursor ends up on. Also pressing left afterwards will shift the application back to the right a bit.
Opening and closing the sidenav resets the application position.

@crisbeto
Copy link
Member

crisbeto commented Jan 2, 2020

It looks like this is a general issue in Chrome since there are a bunch of results that come up like this: https://stackoverflow.com/questions/17808854/pressing-pageup-while-in-textarea-moves-website-out-of-the-window

I tried playing around with some solutions like making the sidenav display: none while it's closed, but it didn't help.

@mmalerba mmalerba added the needs triage This issue needs to be triaged by the team label May 20, 2020
@crisbeto crisbeto added area: material/sidenav P4 A relatively minor issue that is not relevant to core functions and removed needs triage This issue needs to be triaged by the team labels May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/sidenav P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

3 participants