ionic-team / ionic-team/ionic-framework

bug: overlay returning focus to wrong element causes scroll

オープン
#25,496 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
package: core type: bug
主要言語
TypeScript
スター
52.7k
フォーク
13.3k
平均マージ
1日 15時間
マージ済み PR(30日)
51

説明

### 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`.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。