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

bug(cdk): element.getClientRects is not a function error in Server side rendering. #7633

Closed
leo6104 opened this issue Oct 8, 2017 · 1 comment · Fixed by #7635
Closed
Assignees

Comments

@leo6104
Copy link

leo6104 commented Oct 8, 2017

Bug, feature request, or proposal:

Bug

What is the expected behavior?

https://github.com/angular/material2/blob/0834a31d03ae6707633e01d43200703840b70c5a/src/cdk/a11y/interactivity-checker.ts#L151
this cdk interactivity-checker code is problem.

What is the current behavior?

ERROR TypeError: element.getClientRects is not a function
    at hasGeometry (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:736:70)
    at InteractivityChecker.isVisible (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:636:16)
    at InteractivityChecker.isFocusable (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:715:85)
    at FocusTrap._getFirstTabbableElement (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:1036:27)
    at FocusTrap._getRegionBoundary (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:991:55)
    at FocusTrap.focusFirstTabbableElement (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:1013:55)
    at FocusTrap.focusInitialElement (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:1006:21)
    at SafeSubscriber._next (~/mapia_ng2/node_modules/@angular/cdk/bundles/cdk-a11y.umd.js:948:71)
    at SafeSubscriber.__tryOrUnsub (~/mapia_ng2/node_modules/rxjs/Subscriber.js:238:16)
    ...

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

I don't know exactly which part make this error occurred. Maybe.. it might be related with sidenav event in SSR. (because other page (not used sidenav) serving well.

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

Angular 5.0.0-rc.1
Angular Material2 - 2.0.0-beta.12
Typescript 2.4, 2.5
Browser: all

@crisbeto crisbeto self-assigned this Oct 8, 2017
@crisbeto crisbeto added the has pr label Oct 8, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Oct 8, 2017
Fixes a couple of errors in the focus trap during server-side rendering. They manifested when there's a sidenav that is open by default.

Fixes angular#7633.
andrewseguin pushed a commit that referenced this issue Oct 9, 2017
Fixes a couple of errors in the focus trap during server-side rendering. They manifested when there's a sidenav that is open by default.

Fixes #7633.
@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 7, 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

Successfully merging a pull request may close this issue.

2 participants