@@ -823,7 +823,7 @@ const PressResponder: ReactDOMEventResponder = {
823823 if (
824824 state . pressTarget !== null &&
825825 ( pointerType !== 'mouse' ||
826- ! context . isTargetWithinElement ( target , state . pressTarget ) )
826+ ! context . isTargetWithinNode ( target , state . pressTarget ) )
827827 ) {
828828 // Calculate the responder region we use for deactivation, as the
829829 // element dimensions may have changed since activation.
@@ -936,7 +936,7 @@ const PressResponder: ReactDOMEventResponder = {
936936 ! isKeyboardEvent &&
937937 state . pressTarget !== null &&
938938 ( pointerType !== 'mouse' ||
939- ! context . isTargetWithinElement ( target , state . pressTarget ) )
939+ ! context . isTargetWithinNode ( target , state . pressTarget ) )
940940 ) {
941941 // If the event target isn't within the press target, check if we're still
942942 // within the responder region. The region may have changed if the
@@ -993,7 +993,7 @@ const PressResponder: ReactDOMEventResponder = {
993993 if (
994994 pressTarget !== null &&
995995 ( scrollTarget === doc ||
996- context . isTargetWithinElement ( pressTarget , scrollTarget ) )
996+ context . isTargetWithinNode ( pressTarget , scrollTarget ) )
997997 ) {
998998 dispatchCancel ( event , context , props , state ) ;
999999 }
0 commit comments