Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Weird dialog and md-select warnings & errors since 0.11.0 #4511

Closed
Tyrannmisu opened this issue Sep 9, 2015 · 16 comments
Closed

Weird dialog and md-select warnings & errors since 0.11.0 #4511

Tyrannmisu opened this issue Sep 9, 2015 · 16 comments
Assignees
Milestone

Comments

@Tyrannmisu
Copy link

I switched from 0.10.1 to 0.11.0 (with angular 1.4.4) and got weird bugs since than, that i do not really understand.

I get the " Unable to find node '{0}' in element. (angular.js:12416) " warning with each and every dialogue that i am opening, it does not matter if it is a custom or confirm-dialog.

When i try to open an md-select inside the dialog i get the following error in chrome:

TypeError: Cannot read property 'scrollHeight' of undefined
    at calculateMenuPositions (angular-material.js:12802)
    at angular-material.js:12475
    at new Q (angular.js:14896)
    at Q (angular.js:14883)
    at positionAndFocusMenu (angular-material.js:12472)
    at processQueue (angular.js:14634)
    at angular.js:14650
    at Scope.$eval (angular.js:15916)
    at Scope.$digest (angular.js:15727)
    at angular.js:15955

and this one in Fire Fox:

Error: contentNode is undefined
calculateMenuPositions@http://localhost:9000/bower_components/angular-material/angular-material.js:12802:9
positionAndFocusMenu/<@http://localhost:9000/bower_components/angular-material/angular-material.js:12475:22
Q@http://localhost:9000/bower_components/angular/angular.js:14896:5
Q@http://localhost:9000/bower_components/angular/angular.js:14883:1
positionAndFocusMenu@http://localhost:9000/bower_components/angular-material/angular-material.js:12472:1
...

I can't find anything in the breaking changes-changelog that could cause this, and it also seems like no one else is complaining.

Am i doing something wrong, or can somebody point me to a direction where to look ?
I am totally clueless right now, the app worked like a charm up to 0.10.1.

Edit:
I also get the same error when using an md-select outside of a dialogue, even if it is something as basic as:

<md-select ng-model="selectedLang.name">
    <md-option ng-repeat="choice in langOptions" value="{{choice.name}}">{{choice.name}}</md-option>
</md-select>
@Tyrannmisu Tyrannmisu changed the title Weird dialog and md-selct warnings & errors since 0.11.0 Weird dialog and md-select warnings & errors since 0.11.0 Sep 9, 2015
@Tyrannmisu
Copy link
Author

The "Unable to find node '{0}' in element." issue was also mentioned in a comment of : #4497

@ThomasBurleson ThomasBurleson added this to the 0.12.0 milestone Sep 9, 2015
@ThomasBurleson ThomasBurleson self-assigned this Sep 9, 2015
@stewones
Copy link

stewones commented Sep 9, 2015

+1

@shusain
Copy link

shusain commented Sep 9, 2015

+1 having this problem with md-select bumping from .10 to .11 fixed the placement of the placeholder label in our project but breaks the md-select itself, once the select is clicked the error above pops up

@ThomasBurleson ThomasBurleson modified the milestones: 0.11.1, 0.12.0 Sep 9, 2015
@RolandHeath
Copy link

Have been having the same issues, but had trouble creating a codepen to replicate anything but the warnings. In my app, the md-select is inside a separate template, included via ng-include.

@RolandHeath
Copy link

CreateSelect() appears to be what generates the SelectContainer which ultimately causes this error. It gets passed as the element to $mdSelect.show(...).
Following from this, $mdSelect.show:

  1. Looks around for any child md-content, finds that there isn't one, and stores an empty JQLite.
  2. Can't read the scrollheight of anything in the empty JQLite that it stored, so it throws.

Still would help to see a codepen, if anyone has managed to produce one.

@ThomasBurleson ThomasBurleson added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Sep 10, 2015
@ThomasBurleson
Copy link
Contributor

Warnings for Unable to find node '{0}' in element. have been fixed with SHA a5d84c3

@ThomasBurleson ThomasBurleson removed the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Sep 10, 2015
@barlowdw
Copy link

Might be a bit late.

For me the md-select error is caused by including the jsqrcode library http://webqr.com/llqrcode.js.
Github: https://github.com/LazarSoft/jsqrcode

I created a codepen with a single md-select and including this library. http://codepen.io/barlowdw/pen/WQQGVP

@aldo-roman
Copy link

+1 this error just pop out today after migrating from 0.10 to 0.11

any fix or workaround available?

@rschmukler
Copy link
Contributor

This is an issue with libraries / code that modify Array.prototype (in the case of jsqrcode .remove) interacting with $mdUtil.supplant. We are shipping up a fix now.

@Tyrannmisu
Copy link
Author

Works fine now, thanks ! :)

@joningib
Copy link

@Tyrannmisu how did you fetch the fix down, my bower install fetches the 0.11.x version but it's missing this fix. Are you building it from source?

@shusain
Copy link

shusain commented Sep 14, 2015

@joningib you can bower install angular-material#master to get the latest that isn't yet fully released as a new version

Also this fix seems to have worked here, thanks to the team for all the hard work and quick turn around on this one.

@joningib
Copy link

@shusain Yeah just tried that few minutes ago... I was too quick in asking for help :)

The fix works here! Great! 👯

@andrewboni
Copy link

Confirmed that the latest in master fixes this bug. (Was using 0.11)

Thanks!

@aderbas
Copy link

aderbas commented Sep 21, 2015

I'm using master (0.11.0) and get this bug. =/

Update: using bower install angular-material#master, fix it. Thks.

@tawani
Copy link

tawani commented Sep 21, 2015

In my case I have to remove any "Array.prototype" code.

@angular angular locked and limited conversation to collaborators Sep 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests