ionic-team / ionic-team/ionic-framework

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

オープン
#25,070 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug: external 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

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

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

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

調査の方向性

Start with the linked StackBlitz reproduction and inspect how ion-item delegates focus to ion-input in Firefox. Verify whether the delegated element emits the native focus and ionFocus events, then confirm the fix against the reproduction and expected focus behavior.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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