material icon indicating copy to clipboard operation
material copied to clipboard

mdDialog: Issue with the size/height of the dialog

Open shalabhaggarwal opened this issue 12 years ago • 3 comments

If we set the element which triggers opening of dialog, say a button, as the parent on the dialog. The dialog height gets limited to the position of that element on the page.

This issue came up after the recent 0.6 release. Earlier the dialog used to open up same irrespective of the parent element and its position.

shalabhaggarwal avatar Dec 02 '14 23:12 shalabhaggarwal

@shalabhaggarwal could you provide a fiddle of the behavior you are seeing?

rschmukler avatar Dec 04 '14 01:12 rschmukler

@rschmukler Below are the two plunks, one for v0.5.1 and one for v0.6.0. The difference between both should be obvious.

plunk for v0.5.1 plunk for v0.6.0

Note the parent specified on $mdDialog.show() in both cases.

shalabhaggarwal avatar Dec 04 '14 23:12 shalabhaggarwal

Ah, @shalabhaggarwal that's actually a result of parent being ignored in 0.5.1, an issue we resolved in 0.6.0.

The parent option inserts the dialog within the specified DOM element, hence why it's limited inside of the button. If you get rid of the parent option, you'll see it displays properly. For a slicker animation (animating "from" the target (i.e., the button)) specify a targetEvent with the event from ng-click.

See this plunker for a working example. Closing for now, but please let me know if you have further questions.

rschmukler avatar Dec 04 '14 23:12 rschmukler