react / react/react-native

Keyboard.addListener ignores its context argument

オープン 初心者向け
#58,230 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Author Feedback Needs: Repro
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

The public Keyboard.addListener(eventType, listener, context?) signature accepts a listener context, but the implementation forwards only the event type and callback to NativeEventEmitter. The supplied context is therefore silently discarded.

Expected behavior

When a context is supplied, keyboard event callbacks should run with that object as this, matching the underlying NativeEventEmitter contract.

React Native Version

0.87.1 and current main

Affected Platforms

JavaScript runtime - All

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

公開の Keyboard.addListener(eventType, listener, context?) エントリポイントから開始し、引数が NativeEventEmitter に転送される方法を追跡します。context を指定して提供されたコールバックが、そのオブジェクトを this として実行されることを確認し、context が提供されない場合は既存の動作が変わらないことを確認します。

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

評価

技術スタック
javascript, react-native
領域
mobile
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
76/100

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

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