Uh oh!
There was an error while loading. Please reload this page.
perf(cdk/overlay): add event listeners for overlay dispatchers outside of zone - #23962
Conversation
crisbeto
left a comment
There was a problem hiding this comment.
Also the CI appears to be failing.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if (!this._isAttached) { | ||
| this._document.body.addEventListener('keydown', this._keydownListener); | ||
| this._ngZone | ||
| ? this._ngZone.runOutsideAngular(() => |
There was a problem hiding this comment.
Can you use an if/else statement here, rather than the ternary? Also can you leave an @breaking-change note here as well? That way our tooling will pick it up when we're doing the breaking changes.
keydown listener outside of zonezarend
commented
Feb 9, 2022
Hello @arturovt, this PR was reverted because it caused an issue internally. Could you please make a new PR with this change? That we can run a fresh presubmit check, then assess how best to proceed with this. |
arturovt
commented
Feb 9, 2022
Hey @zarend , alright. |
…s outside of zone (angular#23962)" (angular#24353) This reverts commit e761455.
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. |
The
OverlayKeyboardDispatcheradds akeydownevent listener, which causes Angular to run change detections on anykeydownevent, tho its listener may behave as a "noop" (e.g. if there're nokeydownEventsobservers).With these changes, the Angular zone will be re-entered only if there're any
keydownEventslisteners.