Skip to content

fix(overlay): account for virtual keyboard offset on mobile devices - #12119

Merged
jelbourn merged 1 commit into
angular:masterfrom
crisbeto:6341/overlay-virtual-keyboard
Jul 12, 2018
Merged

jelbourn merged 1 commit into
angular:masterfrom
crisbeto:6341/overlay-virtual-keyboard

Conversation

@crisbeto

@crisbeto crisbeto commented Jul 9, 2018

Copy link
Copy Markdown
Member

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.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Jul 9, 2018
@crisbeto
crisbeto requested a review from jelbourn as a code owner July 9, 2018 20:07
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 9, 2018
@crisbeto

crisbeto commented Jul 9, 2018

Copy link
Copy Markdown
Member Author

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.

}

// @deletion-target 7.0.0 Remove `_overlayContainer` null check
// once it's guaranteed to be defined.

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Member Author

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.
@crisbeto
crisbeto force-pushed the 6341/overlay-virtual-keyboard branch from bceba68 to 5802e6f Compare July 10, 2018 19:19

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@vmachacek

Copy link
Copy Markdown

Can someone please tell me when we can expect this to be released?

@itsanmax

Copy link
Copy Markdown

@jelbourn , @crisbeto: Thanks for fixing this issue. Please let us know how and by when we'll get this fix to test our local code?

@kwkelly

kwkelly commented Jul 18, 2018

Copy link
Copy Markdown

@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

victoriaaa234 pushed a commit that referenced this pull request Jul 25, 2018
…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.
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Sep 9, 2019
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 cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autocompletes overlay position works wrong on mobile devices

7 participants