Skip to content
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

MdMenu, OverlayRef: Cannot read property 'removeChild' of null #1812

Closed
rolandjitsu opened this issue Nov 10, 2016 · 3 comments
Closed

MdMenu, OverlayRef: Cannot read property 'removeChild' of null #1812

rolandjitsu opened this issue Nov 10, 2016 · 3 comments

Comments

@rolandjitsu
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Should not throw an exception.

What is the current behavior?

The first time a user navigates away (clicks on one of the items in the menu that leads to another page - via angular router) from a <md-menu> that is currently opened, it throws an exception:

TypeError: Cannot read property 'removeChild' of null
    at HTMLDivElement.eval (overlay-ref.js:86)
    at e.invokeTask (zone.min.js:1)
    at Object.onInvokeTask (core.umd.js:6197)
    at e.invokeTask (zone.min.js:1)
    at n.runTask (zone.min.js:1)
    at HTMLDivElement.invoke (zone.min.js:1)
ErrorHandler.handleError @ core.umd.js:3010
next @ core.umd.js:6654
schedulerFn @ core.umd.js:5952
SafeSubscriber.__tryOrUnsub @ Subscriber.ts:238
SafeSubscriber.next @ Subscriber.ts:190
Subscriber._next @ Subscriber.ts:135
Subscriber.next @ Subscriber.ts:95
Subject.next @ Subject.ts:61
EventEmitter.emit @ core.umd.js:5944
NgZone.triggerError @ core.umd.js:6248
onHandleError @ core.umd.js:6227
n.runTask @ zone.min.js:1
invoke @ zone.min.js:1

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, browsers are affected?

2.0.0-alpha.10

Is there anything else we should know?

@crisbeto
Copy link
Member

#1716 might fix this.

@jelbourn jelbourn changed the title fix(MdMenu, OverlayRef): Cannot read property 'removeChild' of null MdMenu, OverlayRef: Cannot read property 'removeChild' of null Nov 10, 2016
@jelbourn
Copy link
Member

Should be fixed by #1716

@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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants