Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

fix hit slop for bottom tab bar#110

Merged
satya164 merged 1 commit intoreact-navigation:masterfrom
vonovak:patch-2
Mar 21, 2019
Merged

fix hit slop for bottom tab bar#110
satya164 merged 1 commit intoreact-navigation:masterfrom
vonovak:patch-2

Conversation

@vonovak
Copy link
Copy Markdown
Member

@vonovak vonovak commented Mar 21, 2019

The problem this fixes is that if you currently tap just slightly above the tab bar, the button in the tab bar is going to respond to the tap - and it should not.

Two reasons for this change:

  1. it breaks detox e2e test in the case when there is a tab navigator, and the screen in it has a scrollview that we're trying to scroll down ( await element(by.id('someScrollView')).scrollTo('bottom');)

The reason this doesn't work is that when detox tries to tap and drag the scrollView, detox taps just above the tab bar - within the reach of the hitslop - and instead of the scrollview responding, the scroll ends up being ignored.

  1. if you take a look at a native app such as files, you'll see that taps outside the bounds of the tab bar are ignored. It should be the same for the tabs in react-navigation

@vonovak vonovak changed the title Update BottomTabBar.js fix hit slop for bottom tab bar Mar 21, 2019
@satya164
Copy link
Copy Markdown
Member

Thanks for the PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants