Skip to content

Tab bar prevents swipe up/down on mobile browser #368

Open
@irvanherz

Description

@irvanherz

Hi, actually I'm coming here because of an issue that I've found in ant-design's tab. I recently discovered that the location of the problem was in rc-tabs. So I tried cloning the master branch and inspecting where the problem was. Finally I found that this problem can be solved by removing e.preventDefault() in useTouchMove.ts file.

You can see it on the branch I forked:
irvanherz@251d871#diff-6098251a64dc37073e837fba36078438a119c06311050fdbc9975bcbd632c60e

Is this small change ok to fix the bug?

Reproduction link

Edit on CodeSandbox

Steps to reproduce

From any mobile browser, try to swipe view up or down by starting finger touching Tabs' bar.

What is expected?

It should scrolling view up/down as I swipe.

What is actually happening?

It does nothing.

Environment Info
antd 4.13.1
React 17.0.1
System Android 7.1.2; Redmi 5A Build/N2G47H
Browser Chrome Version 88.0.4324.181

My project using many tabs at home page. This bug oftenly brings problem for any users who open the page from mobile browser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions