ampproject / ampproject/amphtml

Android soft keyboard causes resize of AMP story page

Open
#35,894 4 comments 0 reactions 1 assignee Claimed by @coreymasanto View on GitHub
P1: High Priority Stale Type: Bug WG: stories
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

The Android soft keyboard causes the story page and the page attachment to resize. The attachment's resizing is acceptable and looks as one would expect. However, the story page behind the attachment also resizes to fit the space available above the keyboard. The worst UX impact is seen when dismissing the attachment while the soft keyboard is open; the result is that the page resizes back to its original size in a way that's obvious to the user.

Note that it is only possible for the soft keyboard to appear when focusing on form elements within page attachments.

### Reproduction Steps

- Once [this PR](https://github.com/ampproject/amphtml/pull/35798) has been merged, go to http://0.0.0.0:8000/examples/amp-story/attachment.html on a local server on an Android device.
- On the story page with the text "one form within small attachment", open the attachment and tap one of text inputs
- Observe the story page's resizing in the background
- Swipe down to dismiss the attachment
- Observe the story page resizing back to its original size

---

Initial story page layout:

Story page layout with open soft keyboard:

### Relevant Logs

_No response_

### Browser(s) Affected

_No response_

### OS(s) Affected

Android

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.