-
Notifications
You must be signed in to change notification settings - Fork 3.4k
dialog: autoWrap in $mdDialog does not work #10508
Comments
I found some information that may be related: http://stackoverflow.com/questions/32097593/angularjs-templateurl-vs-template-scope-issue. The answer in the Stackoverflow is not directly to this bug, but I think the principal applies. My hypothesis is that when templateUrl is used, this bug happens because during the compilation, the custom directive is not expanded yet to md-dialog. Whereas if template is used, then the compilation will expand the custom directive to md-dialog early and ngmaterial code will see that md-dialog is already there, and honor autoWrap. |
This issue is due to an exception in the material/src/core/services/aria/aria.js Lines 74 to 88 in ecf1705
In this demo, it gets passed two elements. It checks the If So it looks like the Aria checks don't pass in the proper parent element when |
I've migrated this demo to StackBlitz and updated it to not rely on I'm going to close this, but I'll mention in #8409 that we need to ensure that |
Actual Behavior:
What is the issue? *
According to $mdDialog spec, If we have a customized directive that expands to
md-dialog
, we can set autoWrap to false. However, this does not always work. The dialog would not show up.(If we set autoWrap to true, it works. But two levels of
md-dialog
are generated, and the caller has no way to style the first level ofmd-dialog
. This makes attributeflex="xxx"
useless.)What is the expected behavior?
Dialog should open.
Demo:
http://plnkr.co/edit/8cMGwKAstTXchz6juEXY?p=preview
No dialog shows up when the button is clicked. And there is error on console.
This demo is based on another bug report: #8409 (comment). The only change is that I added "autoWrap: false".
It is possible that there is some link between that bug and this one.
AngularJS Versions: *
AngularJS Version:
1.5.9AngularJS Material Version:
1.1Additional Information:
Browser Type:
ChromeBrowser Version: *
56.0.2924.87OS: *
UbuntuStack Traces:
The text was updated successfully, but these errors were encountered: