We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25a529f commit 37fadadCopy full SHA for 37fadad
packages/react-native/Libraries/Pressability/Pressability.js
@@ -553,6 +553,13 @@ export default class Pressability {
553
return;
554
}
555
556
+ // for non-pointer click events (e.g. accessibility clicks), we should only dispatch when we're the "real" target
557
+ // in particular, we shouldn't respond to clicks from nested pressables
558
+ if (event?.currentTarget !== event?.target) {
559
+ event?.stopPropagation();
560
+ return;
561
+ }
562
+
563
const {onPress, disabled} = this._config;
564
if (onPress != null && disabled !== true) {
565
onPress(event);
0 commit comments