-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(overlay): don't reset global overlay alignment when width is 100% and there's a maxWidth #17842
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(overlay): don't reset global overlay alignment when width is 100% and there's a maxWidth #17842
Conversation
… and there's a maxWidth A long time ago we introduced some logic that clears the `justifyContent` from a global overlay if it's `width` is set to 100%, in order to ensure that the element is flush against the viewport edge. Some time later we added a `maxWidth` option, but we never accounted for it which means that if an element is set to be `width: 100%; maxWidth: '500px'`, we'll reset the alignment incorrectly. These changes tweak the logic so it only resets if there is no `maxWidth` or if it's set to 100%. Fixes angular#17841.
9ad8ab6
to
68a6d1d
Compare
I must've missed the notification about this one. @jelbourn the feedback is addressed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… and there's a maxWidth (#17842) A long time ago we introduced some logic that clears the `justifyContent` from a global overlay if it's `width` is set to 100%, in order to ensure that the element is flush against the viewport edge. Some time later we added a `maxWidth` option, but we never accounted for it which means that if an element is set to be `width: 100%; maxWidth: '500px'`, we'll reset the alignment incorrectly. These changes tweak the logic so it only resets if there is no `maxWidth` or if it's set to 100%. Fixes #17841. (cherry picked from commit 9f2c937)
… and there's a maxWidth (angular#17842) A long time ago we introduced some logic that clears the `justifyContent` from a global overlay if it's `width` is set to 100%, in order to ensure that the element is flush against the viewport edge. Some time later we added a `maxWidth` option, but we never accounted for it which means that if an element is set to be `width: 100%; maxWidth: '500px'`, we'll reset the alignment incorrectly. These changes tweak the logic so it only resets if there is no `maxWidth` or if it's set to 100%. Fixes angular#17841.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
A long time ago we introduced some logic that clears the
justifyContent
from a global overlay if it'swidth
is set to 100%, in order to ensure that the element is flush against the viewport edge. Some time later we added amaxWidth
option, but we never accounted for it which means that if an element is set to bewidth: 100%; maxWidth: '500px'
, we'll reset the alignment incorrectly. These changes tweak the logic so it only resets if there is nomaxWidth
or if it's set to 100%.Fixes #17841.