Skip to content
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

fix(cdk/overlay): fix overlay margin in isBoundedByLeftViewportEdge #28233

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

kryshac
Copy link
Contributor

@kryshac kryshac commented Dec 5, 2023

When the overlay is opening 'left-ward' (the content flows to the left) the margin is not calculated correctly because the margin is subtracted twice from the width (line: 1092), but here it is added only once

@jelbourn
Copy link
Member

jelbourn commented Dec 5, 2023

I'm not sure if this is the desired behavior? It's been a long time since I wrote this, but I think that we'd want to keep it such that the rightmost edge of the bounding box is the actual viewport edge minus one margin, no?

@kryshac
Copy link
Contributor Author

kryshac commented Dec 5, 2023

because I have a margin in the viewport, the overlay goes to the right, exactly as much as the margin is set
image

@kryshac
Copy link
Contributor Author

kryshac commented Dec 5, 2023

and also the same behavior is implemented when calculating the bottom line 772

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, understood

@jelbourn jelbourn added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Dec 8, 2023
@mmalerba mmalerba self-assigned this Jan 10, 2024
@kryshac
Copy link
Contributor Author

kryshac commented Feb 11, 2024

@jelbourn @mmalerba hello, what is happening with this pull request?

@GiorgiZanqaidze
Copy link

..

@crisbeto crisbeto assigned crisbeto and unassigned mmalerba Feb 26, 2024
@crisbeto crisbeto removed their request for review February 26, 2024 13:26
@crisbeto crisbeto merged commit 8f60b62 into angular:main Feb 26, 2024
25 of 27 checks passed
crisbeto pushed a commit that referenced this pull request Feb 26, 2024
@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 Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants