Skip to content

[BUG] Layout prop children stretching in mobile browsers #1372

@MartinRybergLaude

Description

@MartinRybergLaude

1. Read the FAQs 👇

Done.

2. Describe the bug

In the documentation, visual stretching of children of an element with "layout" prop set are expected to stretch unless the direct children bear the layout prop as well. This works as expected in desktop browsers, but in mobile browsers, a stretch, sometimes permanent, still happens under certain conditions.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/s/framer-motion-5-layout-prop-behavior-eezf8?file=/src/App.tsx

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Open sandbox in mobile browser (chrome and firefox on android tested)
  2. Press "search" button

5. Expected behavior

Expecting no stretching of children to occur. When entering the input field and pressing enter on the mobile keyboard, expected behaviour is shown. Only the search button causes issues here.

6. Video or screenshots
Current behavior:
2021-11-29 22 17 25
Expected behavior:
2021-11-29 22 17 16

7. Environment details

Android 12, Chrome 96 and Firefox 94

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions