Skip to content

Commit

Permalink
Fix static view config not to filter out "onClick" events on Android (#…
Browse files Browse the repository at this point in the history
…41628)

Summary:
Pull Request resolved: #41628

# Changelog:

Even though `onClick` is used on Android (e.g. via Pressability), the fact of having the handler registered didn't get through to the C++ side on New Architecture, because of being filtered out via the corresponding static view config.

As the result, there was no way to know on C++ side whether the corresponding event handler is registered for the view or not. Dynamic updates to the prop also wouldn't correctly propagate to C++, which may be a problem if a view gets e.g. the handler dynamically added.

Reviewed By: javache

Differential Revision: D51551255

fbshipit-source-id: 0783f5a27c7250f83fb357173bbe5be6213277e5
  • Loading branch information
rshest authored and facebook-github-bot committed Nov 23, 2023
1 parent b71bb81 commit 342041e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ const validAttributesForEventProps = {
onTouchCancel: true,

// Pointer events
onClick: true,
onPointerEnter: true,
onPointerEnterCapture: true,
onPointerLeave: true,
Expand Down

0 comments on commit 342041e

Please sign in to comment.