Skip to content

Flexible overlay incorrectly position perfectly fit window #14968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jakubnavratil opened this issue Jan 26, 2019 · 1 comment · Fixed by #14975
Closed

Flexible overlay incorrectly position perfectly fit window #14968

jakubnavratil opened this issue Jan 26, 2019 · 1 comment · Fixed by #14975
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@jakubnavratil
Copy link

jakubnavratil commented Jan 26, 2019

What is the expected behavior?

Content that perfectly fit into flexible overlay should position correctly.

What is the current behavior?

IF
overlay overflows to the right of viewport caused by originElement position
AND
also should perfectly fit into viewport with margins
THEN
it is wrongly pushed to the original position and still overflows to the right of viewport

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-3s77qz?file=app%2Fapp.component.ts

Is there anything else we should know?

Should be fixed at this line: https://github.com/angular/material2/blob/e7b0e40bfa1b91b7ab05c1375f0b0d85c7e18d69/src/cdk/overlay/position/flexible-connected-position-strategy.ts#L633
Operator should be <= instead of <

I guess same could apply for height:
https://github.com/angular/material2/blob/e7b0e40bfa1b91b7ab05c1375f0b0d85c7e18d69/src/cdk/overlay/position/flexible-connected-position-strategy.ts#L639

@crisbeto crisbeto self-assigned this Jan 27, 2019
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Jan 27, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Jan 27, 2019

Verified

This commit was signed with the committer’s verified signature.
Doctor-wu Doctor Wu
…as the viewport

Fixes the flexible position strategy pushing the overlay when it doesn't have to, if it's exactly as wide as the viewport.

Fixes angular#14968.
mmalerba pushed a commit that referenced this issue Jan 30, 2019
…as the viewport (#14975)

Fixes the flexible position strategy pushing the overlay when it doesn't have to, if it's exactly as wide as the viewport.

Fixes #14968.
mmalerba pushed a commit that referenced this issue Feb 4, 2019
…as the viewport (#14975)

Fixes the flexible position strategy pushing the overlay when it doesn't have to, if it's exactly as wide as the viewport.

Fixes #14968.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
2 participants