Skip to content

Snackbar and dialog taking full screen in production #14376

Closed
@kartikwatwani

Description

@kartikwatwani

Bug, feature request, or proposal:

I use MatDialog and MatSnackBar at various points in my web app to notify/ warn user about something. When I use these in debug mode using ng serve the size and position of snackbar is correct like snackbar is at the bottom of the page with height approximately 50-60px and dialog is at center of page with height enough to wrap the content. Now the problem what is occuring is when I am using ng build --prod --build-optimizer and uploading files to firebase hosting these same dialogs and snackbars are taking full height and full width.

What is the expected behavior?

The dialogs and snackbars should show normal behaviour in production mode

What is the current behavior?

Dialogs and snackbars cover whole screen in production mode

What is the use-case or motivation for changing an existing behavior?

Nice UI for the user

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

  "@angular/animations": "^7.0.1",
    "@angular/cdk": "^7.0.2",
    "@angular/common": "^7.0.1",
    "@angular/compiler": "^7.0.1",
    "@angular/core": "^7.0.1",
    "@angular/fire": "^5.1.0",
    "@angular/forms": "^7.0.1",
    "@angular/http": "^7.0.1",
    "@angular/material": "^7.0.2",

Is there anything else we should know?

Images in production
2018-12-04
2018-12-04 1

Images in debug mode
2018-12-04 3
2018-12-04 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions