Skip to content

bug: menu in first split pane is not expanded automatically if there is a second split pane nested inside it #22341

@kdankert

Description

@kdankert

Bug Report

Ionic version:

[ ] 4.x
[x] 5.x

Current behavior:

The layout is correct, although the menu in the first split pane is not expanded (able to toggle it with the menu toggle button). Depending on the when clause in the second split pane, it works after resizing, so that split pane 1 is triggered

Expected behavior:

The menu should be expanded when loading the site and not depend on any other split panes.

Steps to reproduce:

  1. Add a split pane with a menu and content inside it
  2. Add a split pane inside the content
  3. Serve the ionic website and menu is not expanded

Related code:

VueJS

<template>
    <ion-app>
        <ion-split-pane content-id="main-content">
            <ion-menu content-id="main-content">
                <ion-header>
                    <ion-toolbar>
                        <ion-title>Menu</ion-title>
                    </ion-toolbar>
                </ion-header>
            </ion-menu>

            <div class="ion-page" id="main-content">
                <ion-header>
                    <ion-toolbar>
                        <ion-buttons slot="start">
                            <ion-menu-toggle menu="start">
                                <ion-button>
                                    <ion-icon :src="list"></ion-icon>
                                </ion-button>
                            </ion-menu-toggle>
                        </ion-buttons>
                        <ion-title>Test</ion-title>
                    </ion-toolbar>
                </ion-header>

                <ion-content class="ion-padding">
                    <ion-split-pane when="sm" content-id="1">
                        <p id="1">Test</p>
                        <p id="2">Test2</p>
                    </ion-split-pane>
                    <ion-router-outlet></ion-router-outlet>
                </ion-content>
            </div>
        </ion-split-pane>
    </ion-app>
</template>

Other information:

Ionic info:

Ionic:

   Ionic CLI       : 6.12.0 (/Users/<user>/.config/yarn/global/node_modules/@ionic/cli)
   Ionic Framework : @ionic/vue 5.4.0

Capacitor:

   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.2

Utility:

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

System:

   NodeJS : v14.13.1 (/usr/local/Cellar/node/14.13.1/bin/node)
   npm    : 6.14.8
   OS     : macOS Catalina

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