-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 positioning when zooming in Safari #24160
Conversation
e087608
to
3ea616e
Compare
// of the screen and to make space for the virtual keyboard. We need to account for this offset, | ||
// otherwise our positioning will be thrown off. | ||
// Additionally, when zooming in Safari this fixes the vertical position. | ||
y -= containerRect.top; |
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.
Just to be on the safe side, shouldn't we check whether top
is negative like we do above with left
?
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.
I added the check. I did not add the check before since there was already no check when the expression was in the method _getExactOverlayY
(there to fix virtual keyboard offset).
Currently, when zooming in Safari in macOS and iOS the overlay is positioned at the wrong place, offset by the zoom offset (left/top). This fix corrects this by adding/subtracting the corresponding offset.
3ea616e
to
ea54c66
Compare
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
Currently, when zooming in Safari in macOS and iOS the overlay is positioned at the wrong place, offset by the zoom offset (left/top). This fix corrects this by adding/subtracting the corresponding offset. (cherry picked from commit a6d21a1)
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. |
Currently, when zooming in Safari in macOS and iOS the overlay is positioned
at the wrong place, offset by the zoom offset (left / top).
This fix corrects this by adding/subtracting the corresponding offset.
Screenshot in Safari 15.1 on macOS with activated zoom:
