Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bridgeless] [RN 0.74] Event cannot be both direct and bubbling: topFocus #11928

Closed
3 of 12 tasks
tjzel opened this issue Apr 8, 2024 · 8 comments · May be fixed by software-mansion/react-native-screens#2154
Closed
3 of 12 tasks

Comments

@tjzel
Copy link

tjzel commented Apr 8, 2024

Current behavior

Install brand new app with
npx react-native@next init NavigationApp --version 0.74.0-rc.6

add all the necessary dependencies.

When running this bit of code:

import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {NavigationContainer} from '@react-navigation/native';

import React from 'react';

function HomeScreen({navigation}) {
  navigation.setOptions({
    headerSearchBarOptions: {},
    headerTransparent: false,
  });

  return null;
}

const Stack = createNativeStackNavigator();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Home" component={HomeScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

I am getting the error:

Event cannot be both direct and bubbling: topFocus

It's on:

    "@react-navigation/native": "^7.0.0-alpha.18",
    "@react-navigation/native-stack": "^7.0.0-alpha.20",
    "react": "18.2.0",
    "react-native": "0.74.0-rc.6",
    "react-native-safe-area-context": "^4.10.0-rc.1",
    "react-native-screens": "^3.31.0-rc.1"

Expected behavior

No crashes 🤡

Reproduction

no-repro.com

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-tab-view

Environment

  • I've removed the packages that I don't use
package version
@react-navigation/native 7.0.0-alpha.18
@react-navigation/native-stack 7.0.0-alpha.20
react-native-safe-area-context 4.10.0-rc.1
react-native-screens 3.31.0-rc.1
react-native 0.74.0-rc.6
Copy link

github-actions bot commented Apr 8, 2024

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

  • @react-navigation/native (found: 7.0.0-alpha.18, latest: 6.1.17)

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

Copy link

github-actions bot commented Apr 8, 2024

Hey @tjzel! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected.

Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information.

You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro.

Copy link

github-actions bot commented Apr 8, 2024

Hey! Thanks for opening the issue. Seems that this issue is related to react-native-screens library which is a dependency of React Navigation. Can you also post your issue in this repo so that it's notified to the maintainers of that library? This will help us fix the issue faster since it's upto the maintainers of that library to investigate it.

@kuldipopenxcell
Copy link

kuldipopenxcell commented Apr 12, 2024

I'm getting similar issue in android when i use Marker component of react-native-maps in MapView.

<MapView
provider={PROVIDER_GOOGLE} // remove if not using Google Maps
style={styles.map}
region={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.015,
longitudeDelta: 0.0121,
}}>
<Marker coordinate={{latitude: 37.78825, longitude: -122.4324}}>


Find the attached screenshot:
Screenshot 2024-04-12 at 2 35 45 PM

Copy link

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

@github-actions github-actions bot added the stale label May 13, 2024
@tboba tboba self-assigned this May 20, 2024
@tboba
Copy link
Contributor

tboba commented May 20, 2024

Hi @tjzel, thanks for submitting this issue 🙏
I can confirm this issue happens on my side, this can be reproduced by switching our internal tests in test examples from non-searchbar test (e.g. Test761) to searchbar one (e.g. Test758). Thanks!

@tboba
Copy link
Contributor

tboba commented May 21, 2024

Hi! We've opened right now a PR that fixes this change. You can follow the progress here. For now, let me close this PR.

Cheers! 👋

@tboba tboba closed this as completed May 21, 2024
Copy link

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants