You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So Overlay adds a div.cdk-overlay-container to the body with position:fixed that fills the entire viewport. Based on that behavior, when positioning the overlay component, FlexibleConnectedPositionStrategy._getOriginPoint returns the top value of the ClientRect. Since the overlay container is fixed, there is no need to take the scroll position into account.
So the component i'm displaying in the overlay contains a <input type="text"> (it's a dropdown component with autocomplete/filtering ability).
Enter iOS: When the overlay is shown, the text input gets the focus automatically. This causes iOS to show the keyboard. This also causes iOS to "disable" all fixed elements. position: fixed becomes position: absolute when the keyboard is visible.
So suddenly the behavior described in the first paragraph no longer works. It should now take the scroll position into account when calculating the originPoint.
What is the expected behavior?
It should position the overlay correctly when the iOS keyboard is visible.
What is the current behavior?
It fails to take the scroll position into account when the iOS keyboard is visible.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest angular/CDK, all iOS versions.
The text was updated successfully, but these errors were encountered:
Bug, feature request, or proposal:
So Overlay adds a
div.cdk-overlay-container
to the body withposition:fixed
that fills the entire viewport. Based on that behavior, when positioning the overlay component,FlexibleConnectedPositionStrategy._getOriginPoint
returns the top value of theClientRect
. Since the overlay container is fixed, there is no need to take the scroll position into account.So the component i'm displaying in the overlay contains a
<input type="text">
(it's a dropdown component with autocomplete/filtering ability).Enter iOS: When the overlay is shown, the text input gets the focus automatically. This causes iOS to show the keyboard. This also causes iOS to "disable" all fixed elements.
position: fixed
becomesposition: absolute
when the keyboard is visible.So suddenly the behavior described in the first paragraph no longer works. It should now take the scroll position into account when calculating the
originPoint
.What is the expected behavior?
It should position the overlay correctly when the iOS keyboard is visible.
What is the current behavior?
It fails to take the scroll position into account when the iOS keyboard is visible.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Latest angular/CDK, all iOS versions.
The text was updated successfully, but these errors were encountered: