Skip to content

bug(overlay/datepicker): calendar is jumping in small viewports when the viewport is resized in 7.0.0-rc.1 #13586

Open
@julianobrasil

Description

@julianobrasil

Bug, feature request, or proposal:

When you have a small view port, the default position strategy is to keep the upper side of the calendar visible on the screen (maybe the bottom part is hidden, and that's ok). But when you resize the viewport in order to see the entire calendar, two things happen:

1 - The revealed bottom part is transparent

record_2018_10_12_07_52_36_387

2 - The calendar jumps down to a position out of sight in the viewport (it seems like the logic inside is trying to push it to a supposed correct position that it would be if the viewport wasn't small in the first place - it's miscalculated)

record_2018_10_12_07_53_42_915

It seems to be a bug with the overlay itself.

What is the expected behavior?

Not happen what's described above

What is the current behavior?

Described above

What are the steps to reproduce?

I tested it on https://beta-angular-material-io.firebaseapp.com/components/datepicker/overview

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

It's a bug

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

Material 7.0.0-rc.1

Is there anything else we should know?

Introduced in #11607 when the position strategy was switched to onPush(true) and withLockedPosition()

cc: @mmalerba and @jelbourn

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/datepicker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions