-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(overlay): account for virtual keyboard offset on mobile devices #12119
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): account for virtual keyboard offset on mobile devices #12119
Conversation
I'm marking this PR as P3 since it has been a very long-standing issue which makes the autocomplete somewhat hard to use on a touch device. |
@@ -839,6 +842,17 @@ export class FlexibleConnectedPositionStrategy implements PositionStrategy { | |||
overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect); | |||
} | |||
|
|||
// @deletion-target 7.0.0 Remove `_overlayContainer` null check | |||
// once it's guaranteed to be defined. |
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.
Could you expand this to explain the circumstances under which overlayContainer
is not defined?
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've updated the comment to be a bit more thorough.
This is taking over from angular#11947. Fixes the connected overlay positioning being thrown off, if it is opened while an input is focused (e.g. when building an autocomplete component). The issue comes from the fact that the browser will offset the entire page in order to put the input in the middle and to make space for the virtual keyboard. Fixes angular#6341.
bceba68
to
5802e6f
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
Can someone please tell me when we can expect this to be released? |
@vmachacek @itsanmax it looks like this was merged into 6.4.x on July 12 and is in the 6.4.0 release as of July 16 (if I'm reading the commits correctly). https://github.com/angular/material2/commits/6.4.x |
…12119) This is taking over from #11947. Fixes the connected overlay positioning being thrown off, if it is opened while an input is focused (e.g. when building an autocomplete component). The issue comes from the fact that the browser will offset the entire page in order to put the input in the middle and to make space for the virtual keyboard. Fixes #6341.
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. |
This is taking over from #11947. Fixes the connected overlay positioning being thrown off, if it is opened while an input is focused (e.g. when building an autocomplete component). The issue comes from the fact that the browser will offset the entire page in order to put the input in the middle and to make space for the virtual keyboard.
Fixes #6341.