Skip to content

Commit

Permalink
Make style pointerEvents take priority over pointerEvents prop (faceb…
Browse files Browse the repository at this point in the history
…ook#34597)

Summary:
Make style pointerEvents take priority over pointerEvents prop. Fixes requested changes in facebook#34586

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - Make style pointerEvents take priority over pointerEvents prop. FIxes requested changes in facebook#34586

Pull Request resolved: facebook#34597

Test Plan: Will rely on green cli

Reviewed By: NickGerleman

Differential Revision: D39269306

Pulled By: cipolleschi

fbshipit-source-id: 0927bf6ad7e3ac63e82dbd1a873532152f29001d
  • Loading branch information
cyrus25 authored and OlimpiaZurek committed May 22, 2023
1 parent f9c3a69 commit 4188867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Components/View/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const View: React.AbstractComponent<
treeitem: undefined,
};

const flattendStyle = flattenStyle(style);
const newPointerEvents = pointerEvents || flattendStyle?.pointerEvents;
const flattenedStyle = flattenStyle(style);
const newPointerEvents = flattenedStyle?.pointerEvents || pointerEvents;

return (
<TextAncestor.Provider value={false}>
Expand Down

0 comments on commit 4188867

Please sign in to comment.