Skip to content

bug: iOS Scroll Assist - Focus on ion-input cloned input moves input up visually  #27249

Description

@japeacock

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

The issue is when focusing on an input the input seems to visually 'jump' or 'move up'. Looked at the DOM and this looks like it could be related to the 'cloned-input' that gets added on focus.

Using Ionic React version 7 with the latest IonInput syntax for label and label placement.

Running the app on iOS on real devices:

  • iPhone 12 Mini - Version 16.2
  • iPad 10th Gen - Version 16.3.1
  • Other emulators for iOS

The problem doesn't seem to be an issue on Android.

Video of behaviour:
https://user-images.githubusercontent.com/10227063/233318903-f1919a2d-626f-47c6-aa4c-fbae69c2885d.MP4

Expected Behavior

On input focus the input shouldn't jump / move up.

Steps to Reproduce

  1. Testing on iOS real device or emulator
  2. Load project up
  3. Attempt to focus on either inputs (pin input seems to do it the most)
  4. Try focusing back and forth on the inputs

Code Reproduction URL

https://github.com/PleoCreative/ion-input-focus-bug

Ionic Info

Ionic:

Ionic CLI : 7.0.1 (/Users/Jacques/.nvm/versions/node/v16.15.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 7.0.3

Capacitor:

Capacitor CLI : 4.7.3
@capacitor/android : not installed
@capacitor/core : 4.7.3
@capacitor/ios : 4.7.3

Utility:

cordova-res : 0.15.4
native-run : 1.7.2

System:

NodeJS : v16.15.0 (/Users/Jacques/.nvm/versions/node/v16.15.0/bin/node)
npm : 9.6.5
OS : macOS Unknown

Additional Information

Found this issue, but not sure if they are related:

#25853

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions