Skip to content

bug: ion-menu containing an ion-accordion scrolls up every time the menu opens #24634

Closed
@erikramalho

Description

@erikramalho

Prerequisites

Ionic Framework Version

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

Current Behavior

If we put a ion-accordion inside a ion-menu with a ion-split-pane app, the menu scrolls up every time you close and reopen the ion-menu. The ion-menu scroll up right after the event ionDidOpen finishes.

Expected Behavior

The ion-menu must keep the scroll postion. This behavior is seen if you put a ion-list + ion-item in a ion-menu.

Steps to Reproduce

Just create a side menu app (ionic start and side menu) and then place a multiple ion-accordion / ion-accordion-group. In the link provided,

  1. open the menu, expand the accordion
  2. scroll down the menu
  3. click outside the menu to close it
  4. reopen the menu: a scroll to top will happen.

Code Reproduction URL

https://stackblitz.com/edit/ionic-5-custom-ion-menu-button-jikmqz?file=src/app/tab1/tab1.page.html

Ionic Info

Ionic CLI : 6.18.1 (/node/v12.22.5/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.1
@angular-devkit/build-angular : 12.2.14
@angular-devkit/schematics : 12.2.14
@angular/cli : 12.2.14
@ionic/angular-toolkit : 5.0.1

Additional Information

No response

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