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
Description
The public
Keyboard.addListener(eventType, listener, context?)signature accepts a listener context, but the implementation forwards only the event type and callback toNativeEventEmitter. 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