ionic-team / ionic-team/ionic-framework

bug: firefox, focus event does not fire when delegating focus

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

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

### Current Behavior

When the user clicks on an `` the focus is delegated to the first focusable element, in my case an ``. In this matter I was expecting the `` to fire with it's respective `(ionFocus)` event, which is unfortunatley not the case. I also tried to add a native `(focus)` event listener, which also does not seem to get triggered.

### Expected Behavior

When the user clicks on an `` the focus should get delegated to the ``, which should then fire an `(ionFocus)` event.

### Steps to Reproduce

See Stackblitz minimal reproduction code below.

### Code Reproduction URL

https://stackblitz.com/edit/ionic6-angular13-gqcrhl?file=src/app/app.component.html

### Ionic Info

```
Ionic:

Ionic CLI : 6.16.3 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.14
@angular-devkit/build-angular : 13.3.1
@angular-devkit/schematics : 13.3.1
@angular/cli : 13.3.1
@ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 3.4.3
@capacitor/android : 3.4.3
@capacitor/core : 3.4.3
@capacitor/ios : 3.4.3

Utility:

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

System:

NodeJS : v14.17.6 (/Users/felixgeissler/.nvm/versions/node/v14.17.6/bin/node)
npm : 6.14.15
OS : macOS Monterey
```

### Additional Information

In my case, this is a real show stopper since I'm trying to use my `` as a focus trigger to open an `` in a popover and I don't want the user to enter something in the input manually. With this approach I need a hook to open the popover once the focus is delegated to the ``.

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

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

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và kiểm tra cách ion-item ủy quyền focus cho ion-input trong Firefox. Xác minh xem phần tử được ủy quyền có phát ra các sự kiện focus và ionFocus gốc hay không, sau đó xác nhận bản sửa bằng bản tái hiện và hành vi focus mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.