Skip to content

Conversation

mmalerba
Copy link
Contributor

fixes #7609

@mmalerba mmalerba requested a review from jelbourn October 11, 2017 21:16
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 11, 2017
spyOn(window, 'addEventListener').and.callThrough();
spyOn(window, 'removeEventListener').and.callThrough();
spyOn(document, 'addEventListener').and.callThrough();
spyOn(document, 'removeEventListener').and.callThrough();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will permanently make these things spies for the rest of the test run; I'm not sure there's a good way to test global listener deregistration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe they are automatically cleaned up at the end of the describe block. There's some discussion about it here: jasmine/jasmine#1281

private _unregisterGlobalListeners = () => {};

/** The number of elements currently being monitored. */
private get _monitoredElementCount() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is private, use functions instead of a getter/setter?

renderer: Renderer2 | boolean,
checkChildren?: boolean): Observable<FocusOrigin> {
// TODO(mmalerba): clean up after deprecated signature is removed.
if (!(renderer instanceof Renderer2)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this to the google cleanups tracker?

@mmalerba
Copy link
Contributor Author

comments addressed

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 27, 2017
@andrewseguin
Copy link
Contributor

Needs rebase.

@andrewseguin andrewseguin added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Nov 2, 2017
@mmalerba mmalerba added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Nov 2, 2017
@josephperrott josephperrott merged commit 8dc8dc4 into angular:master Nov 10, 2017
@mmalerba mmalerba deleted the fo branch July 31, 2018 21:19
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FocusMonitor does not remove event handler registered on document and window
5 participants