ionic-team / ionic-team/ionic-framework

bug: overlay returning focus to wrong element causes scroll

Đang mở
#25,496 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
package: core type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.