-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix(material/menu): position classes not updated when window is resized #24385
Conversation
Relates to internal bug b/218602349. We were calling `MatMenu.setPositionClasses` in order to set the classes if the position changes, but the call was outside of the `NgZone` so nothing was happening. These changes bring the call back into the `NgZone`.
4e18181
to
bcf803e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question
@@ -1326,6 +1326,29 @@ describe('MatMenu', () => { | |||
expect(panel.classList).not.toContain('mat-menu-above'); | |||
})); | |||
|
|||
it('should update the position classes if the window is resized', fakeAsync(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crisbeto This test does somehow not cover the new logic as it passes even without the changes in code.
angular#24385) Relates to internal bug b/218602349. We were calling `MatMenu.setPositionClasses` in order to set the classes if the position changes, but the call was outside of the `NgZone` so nothing was happening. These changes bring the call back into the `NgZone`.
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`13.2.2` -> `13.2.3`](https://renovatebot.com/diffs/npm/@angular%2fcdk/13.2.2/13.2.3) | | [@angular/material](https://github.com/angular/components) | dependencies | patch | [`13.2.2` -> `13.2.3`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/13.2.2/13.2.3) | --- ### Release Notes <details> <summary>angular/components</summary> ### [`v13.2.3`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#​1323-platinum-pen-2022-02-16) [Compare Source](angular/components@13.2.2...13.2.3) ##### material | Commit | Type | Description | | -- | -- | -- | | [2c73b2df6](angular/components@2c73b2d) | fix | **menu:** position classes not update when window is resized ([#​24385](angular/components#24385)) | ##### cdk-experimental | Commit | Type | Description | | -- | -- | -- | | [8c632ee87](angular/components@8c632ee) | fix | **column-resize:** Fix bug in hover logic introduced by IE cleanup ([#​24396](angular/components#24396)) | #### Special Thanks Karl Seamon, Kristiyan Kostadinov, Paul Gschwendtner, Zach Arend and Zack Elliott <!-- CHANGELOG SPLIT MARKER --> </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Co-authored-by: cabr2-bot <[email protected]> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1176 Reviewed-by: Epsilon_02 <[email protected]> Co-authored-by: Calciumdibromid Bot <[email protected]> Co-committed-by: Calciumdibromid Bot <[email protected]>
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Relates to internal bug b/218602349. We were calling
MatMenu.setPositionClasses
in order to set the classes if the position changes, but the call was outside of theNgZone
so nothing was happening. These changes bring the call back into theNgZone
.