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

panel: render panel offscreen when checking positioning #8401

@ErinCoughlan

Description

@ErinCoughlan

Actual behavior:
Occasionally, the panel flashes on the screen before it animates and is in the final position.

This is caused because the panel needs to know its height and width in order to know where to render it on the screen (for relative positioning).

Solution:
Render the panel offscreen when determining the height and width (at left: -9999px). The code to change is here. The panel is appended to the DOM, then the positions are calculated, then the panel is hidden until the user calls open. The append step should apply the position to md-panel.

CodePen or Steps to reproduce the issue: *

  • CodePen Demo which shows your issue : Demo Site
  • Details: Continue opening and closing the panel until you see it flash. It's about 1 in 20 that this happens or is noticeable.

Angular Versions: *

  • Angular Version: 1.4/1.5
  • Angular Material Version: HEAD

Additional Information:

  • Browser Type: *
  • Browser Version: *
  • OS: *
  • Stack Traces:

Shortcut to create a new CodePen Demo.
Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

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