Skip to content

bug: Master view rendered on detail view #20298

Closed

Description

@orhanmaden

Bug Report

Ionic version:

[x] 4.x

Current behavior:

  1. I navigate from master view to detail view
  2. I navigate from detail view to master view by sliding my thumb from the left side of my device to the right (I don't use the back button)
  3. I see the master view rendered on the detail view halfway through the animation

Expected behavior:

  1. I navigate from master view to detail view
  2. I navigate from detail view to master view by sliding my thumb from the left side of my device to the right (I don't use the back button)
  3. I see the detail view sliding out of the screen and the master view sliding onto the screen

Steps to reproduce:

Related code:
App.tsx

import React from 'react';
import { Redirect, Route } from 'react-router-dom';
import { IonApp, IonRouterOutlet } from '@ionic/react';
import { IonReactRouter } from '@ionic/react-router';
import Home, { DetailPage } from './pages/Home';

/* Core CSS required for Ionic components to work properly */
import '@ionic/react/css/core.css';

/* Basic CSS for apps built with Ionic */
import '@ionic/react/css/normalize.css';
import '@ionic/react/css/structure.css';
import '@ionic/react/css/typography.css';

/* Optional CSS utils that can be commented out */
import '@ionic/react/css/padding.css';
import '@ionic/react/css/float-elements.css';
import '@ionic/react/css/text-alignment.css';
import '@ionic/react/css/text-transformation.css';
import '@ionic/react/css/flex-utils.css';
import '@ionic/react/css/display.css';

/* Theme variables */
import './theme/variables.css';

const App: React.FC = () => (
  <IonApp>
    <IonReactRouter>
      <IonRouterOutlet>
        <Route path="/home" render={() => <Home />} exact={true} />
        <Route path="/home/detailpage" component={DetailPage} exact={true} />
        <Route exact path="/" render={() => <Redirect to="/home" />} />
      </IonRouterOutlet>
    </IonReactRouter>
  </IonApp>
);

export default App;

Home.tsx

import {
  IonContent,
  IonHeader,
  IonPage,
  IonTitle,
  IonToolbar,
  IonButtons,
  IonImg,
  IonThumbnail,
  IonList,
  IonItem,
  IonLabel,
  IonBackButton
} from '@ionic/react';

import React from 'react';

const Home: React.FC = () => {
  console.log('Home');

  return (
    <IonPage>
      <IonHeader>
        <IonToolbar>
          <IonTitle>Master</IonTitle>
        </IonToolbar>
      </IonHeader>
      <IonContent className="ion-padding">
        <IonList>
          <IonItem routerLink="/home/detailpage" routerDirection="forward" detail>
            <IonThumbnail slot="start">
              <IonImg src="https://via.placeholder.com/80" />
            </IonThumbnail>
            <IonLabel>Item 1</IonLabel>
          </IonItem>
          <IonItem routerLink="/home/detailpage" routerDirection="forward" detail>
            <IonThumbnail slot="start">
              <IonImg src="https://via.placeholder.com/80" />
            </IonThumbnail>
            <IonLabel>Item 1</IonLabel>
          </IonItem>
        </IonList>
      </IonContent>
    </IonPage>
  );
};

export const DetailPage: React.FC = () => {
  console.log('DetailPage');

  return (
    <IonPage>
      <IonContent>
        <IonHeader>
          <IonToolbar>
            <IonButtons slot="start">
              <IonBackButton defaultHref="/home" />
            </IonButtons>
            <IonTitle>Detail</IonTitle>
          </IonToolbar>
        </IonHeader>
      </IonContent>
    </IonPage>
  );
};

export default Home;

Other information:

Ionic info:

Ionic:

   Ionic CLI       : 5.4.15 (C:\Users\orhan\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework : @ionic/react 4.11.8

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v13.6.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.13.4
   OS     : Windows 10

Videos with the bug
https://1drv.ms/v/s!Ar4rl_YphkxLvC8d4E7HZq-Ielo4
https://1drv.ms/v/s!Ar4rl_YphkxLvDBllMHCjK3aBl9M

Activity

  1. changed the title [-]bug: [/-] [+]bug: Master view rendered on detail view[/+] on Jan 25, 2020
  2. emindeniz99 commented on Aug 4, 2020

    @emindeniz99

    This issue continues

    "@ionic/react": "^5.3.1"

  3. added
    ionitron: needs reproduction
    on Oct 1, 2020
  4. ionitron-bot commented on Oct 1, 2020

    @ionitron-bot

    Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

    Please provide a reproduction with the minimum amount of code required to reproduce the issue. Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

    For a guide on how to create a good reproduction, see our Contributing Guide.

  5. liamdebeasi commented on Oct 20, 2020

    @liamdebeasi
    Contributor

    Thanks for the issue! This issue is being closed due to the lack of a code reproduction. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

    Thank you for using Ionic!

  6. locked and limited conversation to collaborators on Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ionitron: needs reproductionpackage: react

    Type

    No type

    Fields

    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