Skip to content

Commit

Permalink
Make style pointerEvents take priority over pointerEvents prop (#34597)
Browse files Browse the repository at this point in the history
Summary:
Make style pointerEvents take priority over pointerEvents prop. Fixes requested changes in #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 #34586

Pull Request resolved: #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 facebook-github-bot committed Sep 6, 2022
1 parent bf6a24b commit a789ead
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 a789ead

Please sign in to comment.