React-native-tab-view: Switching between portrait and landscape orientation UI stucks between two tabs

Created on 9 Sep 2019  Â·  15Comments  Â·  Source: satya164/react-native-tab-view

Current behaviour

Especially on scrollable tab, when i'm switching between vertical and horizontal device orientation, UI stucks between two tabs but it could be unblocked by a swipe or a press on a tab item

Expected behaviour

when i'm switching between vertical and horizontal device orientation, UI should stay at same tab

Code sample

For Syntax Highlighting check this link

There is a repro in example folder

Screenshots (if applicable)

Screenrecorder-2019-09-09-16-41-17-382
Sorry for bad quality :/

What have you tried

Nothing for the moment

Your Environment

| software | version
| ---------------------------- | -------
| android | 28
| react-native | 0.59.8 (same bug with 0.60.4)
| react-native-tab-view |
| react-native-gesture-handler | 1.2.1
| react-native-reanimated | 1.0.1
| node | 10.15.2
| npm | 6.9.0

bug hacktoberfest help wanted

All 15 comments

@Thebarda Any luck on resolving this? I'm getting the same issue for both Android & iOS.

@deefourple Sorry but I'm in vacation until next week. I'll keep you in touch

sorry, the problem still exists

@wayne214 @deefourple I've just create another PR

Same error

I made some hack in order to make it workable. Idk if it helps your cases #915

@satya164 @osdnk I've had multiple users reporting this issue, mainly on iOS, with version 2.10.2... I think you can reopen.

The problem still exists with current version (2.13.0) in our case... Should be reopened since the fix of #915 was reverted in November

any update? i still facing this issue ...

The problem still exists.

I have the same problem but only in ios.

Same problem. It happens when I'm on one of the inner tabs and I switch from portrait to landscape or viceversa. It's happening on both iOS and Android for me.

Found a workaround by forcing the component to refresh itself when the orientation changes.

const window = Dimensions.get("window");

return (
  <Tab.Navigator
    key={window.width}  
    ...

Cheers,
Alvaro

The problem is also present in @react-navigation/material-top-tabs since it is based on react-native-tab-view

Any suggestion on that please?

Updating react-native-tab-view to the latest version (3.0.0) solved this for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

QuentinBrosse picture QuentinBrosse  Â·  4Comments

chen504554911 picture chen504554911  Â·  3Comments

glennvgastel picture glennvgastel  Â·  3Comments

moerabaya picture moerabaya  Â·  4Comments

jasonkw9 picture jasonkw9  Â·  3Comments