-
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
autocomplete error: TypeError: Cannot read property 'originX' of undefined #3176
Comments
It is worth noting here that taking your TS file from the actual source does work so it is probably just an issue with documentation. |
@starksds The plunker demo from the docs site is working as expected for me. Can you link to a plunker repro case so we can look into this? |
Ok, so I actually couldn't get it to work with the src code or with what is in the plunkr demo. Here is my package.json dependencies, do you see anything that might be an issue? "dependencies": { |
@kara I'm pretty sure it is due to a lazy loaded module |
Thanks, that's helpful. Can you also paste a fuller stack trace of the error you're getting? |
@kara the error was due to missing the BrowserModule in a lazy loaded route. I'll recreate and add the stacktrace. |
Uncaught TypeError: Cannot read property 'originX' of undefined |
@kara so after further testing it appears to be related to having the devtools open in a docked window (and taking up most of the screen). this is reproducible on the material demo component site and plunkr |
Autocomplete also doesn't work on iPhone 6s (and possibly others too). The options list never shows. |
@starksds Thanks for the clarification! Seeing it now too when I open Devtools and make the viewport really small. My hunch is that it's related to this PR: #3189. None of the positions fit, so it's crashing. We should be using the first position as a default. Can you test again against your app once the fix gets in? |
@kara I can certainly test once the code is merged up. Any ideas when the next release is going to be? |
@starksds This looks fixed to me on master, so I'm closing. Should be out with the next release. |
So when will this part rectified????? |
@kara Thanks for moving forward on this fix. When can we expect these changes to be released? |
@whyao Beta.3 is out and should include this fix. I haven't had a chance to verify it yet though. |
Verified. It has been fixed. |
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. |
Bug, feature request, or proposal:
Getting an error when using the example code provided at https://material.angular.io/components/component/autocomplete
What is the expected behavior?
Should work like demo
What is the current behavior?
Error is thrown when field receives focus
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?
It should work or give a better error
Which versions of Angular, Material, OS, browsers are affected?
Material 2.0.0-beta.2
Angular 4.0.0-beta.7
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: