ionic-team / ionic-team/ionic-framework

bug: overlay returning focus to wrong element causes scroll

Abierto
#25,496 3 comentarios 0 reacciones 0 asignados Ver en GitHub
package: core type: bug
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

- [ ] v4.x
- [ ] v5.x
- [X] v6.x
- [ ] Nightly

### Current Behavior

The scroll resets after clicking on a card.

![ion-accordion-test](https://user-images.githubusercontent.com/40690270/174295121-1491316b-35da-46ae-aca4-24270f9f0918.gif)

### Expected Behavior

The view stays in the current position.

### Steps to Reproduce

1. Install the code example
2. Scroll down
3. Click on a card

### Code Reproduction URL

https://github.com/csaar95/ion-accordion-test

### Ionic Info

Ionic:

Ionic CLI : 6.18.1 (C:\Users\Christian\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/react 6.1.10

Capacitor:

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

Utility:

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

System:

NodeJS : v16.13.0 (C:\Program Files\nodejs\node.exe)
npm : 8.1.0
OS : Windows 10

### Additional Information

It cost me some time to exactly find out what causes this behaviour, it seems the bug only appears if there is an `IonCardHeader` with `IonCardTitle` inside the `IonCard`.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.