components icon indicating copy to clipboard operation
components copied to clipboard

Angular Materials 6.3.0 Dialog is not center align after update?

Open Mds92 opened this issue 8 years ago • 15 comments

Bug, feature request, or proposal:

Angular Materials 6.3.0 Dialog is not center align after update?

What is the expected behavior?

Dialog must be in center horizontally and vertically as default

What is the current behavior?

Dialog is right align horizontally

What are the steps to reproduce?

It occurred after update material 6.2.1 to 6.3.0

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

6.3.0

Is there anything else we should know?

modal

Mds92 avatar Jun 24 '18 12:06 Mds92

https://github.com/angular/material2/pull/11393 may be related. Share u code for open dialog

WandererInVoids avatar Jun 24 '18 12:06 WandererInVoids

Thanks, I found what causes this problem. Whenever I set dir="rtl" in html as follows <html lang="en" dir="rtl"> above problem occurred. How can I fix it?

Mds92 avatar Jun 24 '18 12:06 Mds92

set custom align https://material.angular.io/components/dialog/api experiment with MatDialogConfig -> DialogPosition

WandererInVoids avatar Jun 24 '18 13:06 WandererInVoids

How can I center horizontally and vertically as default ?

Mds92 avatar Jun 24 '18 13:06 Mds92

set options in root for MatDialogConfig or use wraper for all modal

WandererInVoids avatar Jun 24 '18 13:06 WandererInVoids

I knew it, I don't know how we can set center align for dialog with DialogPosition

Mds92 avatar Jun 25 '18 02:06 Mds92

Please see file dialog-overview-example-dialog.html, dialog-overview-example.ts it`s workaround https://stackblitz.com/edit/angular-rktjpm?file=app%2Fdialog-overview-example-dialog.html

WandererInVoids avatar Jun 25 '18 11:06 WandererInVoids

@Mds92 Please provide a reproduction of your issue as I am not able to reproduce it myself to be able to investigate the issue you are seeing.

josephperrott avatar Jun 25 '18 17:06 josephperrott

Just add dir="rtl" to html tag

Mds92 avatar Jun 26 '18 02:06 Mds92

Adding dir="rtl" in this stackblitz seems to work as expected. Can you provide a reproduction from this fork?

josephperrott avatar Jun 26 '18 16:06 josephperrott

https://stackblitz.com/edit/angular-rktjpm-bemlsf?file=app%2Fdialog-overview-example.ts look at index.html

WandererInVoids avatar Jun 26 '18 17:06 WandererInVoids

I have the same problem

Is there any solution

image

Abdullah-FAl avatar Jun 28 '18 07:06 Abdullah-FAl

The same answer of @WandererInVoids https://stackoverflow.com/questions/51009781/angular-materials-6-3-0-dialog-is-not-center-align-after-update/51063213#51063213

Mds92 avatar Jun 28 '18 07:06 Mds92

Fixed by #11877

josephperrott avatar Jul 02 '18 16:07 josephperrott

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.