fix(material/menu): position classes not updated when window is resized#24385
Merged
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
devversion
approved these changes
Feb 10, 2022
| expect(panel.classList).not.toContain('mat-menu-above'); | ||
| })); | ||
|
|
||
| it('should update the position classes if the window is resized', fakeAsync(() => { |
Contributor
There was a problem hiding this comment.
@crisbeto This test does somehow not cover the new logic as it passes even without the changes in code.
amysorto
pushed a commit
to amysorto/components
that referenced
this pull request
Feb 15, 2022
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`.
crapStone
pushed a commit
to Calciumdibromid/CaBr2
that referenced
this pull request
Feb 18, 2022
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 <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1176 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
This was referenced Feb 25, 2022
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to internal bug b/218602349. We were calling
MatMenu.setPositionClassesin order to set the classes if the position changes, but the call was outside of theNgZoneso nothing was happening. These changes bring the call back into theNgZone.