-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Keyboard closes when using Material Top Bar (Android) #10397
Comments
We also ran into this bug and wound a temporary workaround. If you move the tab with the input to the first index, the keyboard stays open, as expected. |
I experience the same behaviour as also @JstnEdr described. For my use-case, only the tab with index 1 (middle tab out of three) shows this bug. All three tabs contain text fields. If I switch the order of the tabs, only the middle tab immediately closes the keyboard after a click into a text field. One additional note: If I set the middle tab with index 1 as the default tab to load, the keyboard works. But if I then navigate back and forth to the same tab again, the keyboard will have the same issue again. Edit 1: |
Hi. I am facing the same problem. I have three tabs and it appers only in middle tab. Is there any progress about the issue? |
@frederikmartin could u pls provide a sample code for the hack u have mentioned. |
import React from "react"
import { createMaterialTopTabNavigator } from "@react-navigation/material-top-tabs"
import FooScreen from "./FooScreen"
import BarScreen from "./BarScreen"
import YoScreen from "./YoScreen"
/*
* Use empty placeholder component to avoid issues on tab with index 1, 3, 5, ... with
* a popping keyboard.
*/
function PlaceholderComponent() {
return <></>
}
function TabNavigationScreen() {
const Tab = createMaterialTopTabNavigator()
return (
<Tab.Navigator initialRouteName="Foo">
<Tab.Screen name="Foo" component={FooScreen} />
<Tab.Screen name="Placeholder" component={PlaceholderComponent} />
<Tab.Screen name="Bar" component={BarScreen} />
<Tab.Screen name="Placeholder2" component={PlaceholderComponent} />
<Tab.Screen name="Yo" component={YoScreen} />
</Tab.Navigator>
)
}
export default TabNavigationScreen Keep in mind, that for my use-case I disabled swiping and only navigate between tabs using |
Just reaching out if there was any progress made with this issue? Currently facing this and unfortunately due to our business requirements, we are unable to re-order the screens so the screen with keyboard input falls on the first index 😭 One thing to note is swiping between tabs does not trigger a keyboard dismiss on the second tab, selecting the tab on the other hand does. |
I'm also facing this issue and we are unable to go live due to this issue . I have been waiting for 4-5 months for the fix, but they are not fixed it yet. 😭 |
Any update on this issue?? |
1 similar comment
Any update on this issue?? |
There are no official fix for this issue so far, but as of now you can fix it in 2 ways.
|
For me, the issue occurs only on the second tab, just like others have mentioned above. Also, I've seen that it doesn't occur if I switch to the second tab by swiping. It happens only when I use the tab bar to switch to the second tab. |
Hey, thanks for opening this issue. I will close this one as a duplicate to keep the discussion in this one #11128 |
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. |
hello @react-navigation/material-top-tabs in last of screen textinput here but when keyboard open then tab bar also scroll up |
Current behavior
Whenever I use
navigation.navigate()
to a screen while using Material Top Bar, or by tapping the tabs at the top, the keyboard opens and then closes.Here's a quick video:
https://user-images.githubusercontent.com/96743857/156367244-e668c845-fbe7-4d4f-8c06-42eb64b94688.mp4
Expected behavior
Keyboard should stay open
Reproduction
https://github.com/andrepaulo-bit/keyboard-flash-problem
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: