Description
What is the expected behavior?
The mat-menu should be aligned to the trigger button. Even when the user has scrolled to the right. This appears to have worked fine in the past (2.0.0-beta.12?):
https://stackblitz.com/edit/dynamic-nested-menus-2ky78m
What is the current behavior?
The mat-menu is offset when opened after scrolling to the right.
Also, scrolling horizontally while the menu is open, the menu and the button are moved in different ways so that they're no longer aligned.
Especially noticeable when the button that triggers the menu is pushed to the right side by some form of styling or just plain text.
What are the steps to reproduce?
Resize the preview window so a horizontal scrollbar shows up:
https://stackblitz.com/edit/angular-bjqru6
Another example:
https://stackblitz.com/edit/angular-cnldxy
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Tested on Firefox and Chrome on Ubuntu 18.
I have tried it with @angular/material version 7.3.7 and 7.2.0 because in #11365 someone said a scrolling issue was fixed in 7.2.0.