-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Timing error with overlay #8758
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
One more thing. If you wrap the call to overlayRef.dispose() in the hide() method inside of a setTimeout({}, 0) then the error goes away. |
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 1, 2017
Fixes an error that is thrown by the `GlobalPositionStrategy` if its connected `OverlayRef` is disposed before the strategy is applied. This could happen, because the `OverlayRef` applies the position strategy asynchronously. Fixes angular#8758.
crisbeto
added
has pr
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
labels
Dec 1, 2017
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 2, 2017
Fixes an error that is thrown by the `GlobalPositionStrategy` if its connected `OverlayRef` is disposed before the strategy is applied. This could happen, because the `OverlayRef` applies the position strategy asynchronously. Fixes angular#8758.
andrewseguin
pushed a commit
that referenced
this issue
Dec 13, 2017
Fixes an error that is thrown by the `GlobalPositionStrategy` if its connected `OverlayRef` is disposed before the strategy is applied. This could happen, because the `OverlayRef` applies the position strategy asynchronously. Fixes #8758.
andrewseguin
pushed a commit
to andrewseguin/components
that referenced
this issue
Dec 19, 2017
…lar#8761) Fixes an error that is thrown by the `GlobalPositionStrategy` if its connected `OverlayRef` is disposed before the strategy is applied. This could happen, because the `OverlayRef` applies the position strategy asynchronously. Fixes angular#8758.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Bug, feature request, or proposal:
I get the following error when using Overlay only when my data is returned from cache instead of pulled from the API.
TypeError: Cannot read property 'style' of null
at GlobalPositionStrategy.apply
This appears to come from line 159 in
https://github.com/angular/material2/blob/master/src/cdk/overlay/position/global-position-strategy.ts
What is the expected behavior?
No error
What is the current behavior?
The error occurs
What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on
@master
): https://goo.gl/uDmqyYStackBlitz starter (using latest
npm
release): https://goo.gl/wwnhMVhttps://stackblitz.com/edit/angular-ow2o5c
What is the use-case or motivation for changing an existing behavior?
It appears to be a timing related issue. I am attempting to create a waiting indicator service using the overlay components and the mat-spinner
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.0.1
Material/cdk 5.0.0.rc.2
Typescript 2.5.3
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: