-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Keyboard.addListener ignores its context argument #58230
Copy link
Copy link
Open
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
Activity
Metadata
Metadata
Assignees
Labels
Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
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