Skip to content

bug: react, parameterized routes causing cloned elements to be misplaced #25321

Description

@ckubitza

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

Using react. When going from a page to the same page (with a different parameter) an IonInput is jumping to the right while the page transition is active.

bug-screencast

Expected Behavior

The IonInput should not jump.

Steps to Reproduce

Have an IonInput on a page with a route parameter and navigate (by routerLink) to the same page with another parameter value.

Code Reproduction URL

https://github.com/ckubitza/ionic-input-page-transition-bug

Ionic Info

Ionic:

Ionic CLI : 6.19.1
Ionic Framework : @ionic/react 6.1.6

Capacitor:

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

Utility:

cordova-res : 0.15.4
native-run : 1.6.0

System:

NodeJS : v16.14.0
npm : 8.3.1
OS : Windows 10

Additional Information

From my observations, the IonInput component accidently has two native inputs inside while the transition is happening (you can break execution on ionViewWillEnter to see it).

duplicate-input

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