ant-design / ant-design-mobile

Essential UI blocks for building mobile web apps.
https://mobile.ant.design
MIT License
11.66k stars 2.4k forks source link

SegmentedControl event unable to trigger in (iphone6) ios 10.2 #3289

Closed wuhao5436 closed 2 years ago

wuhao5436 commented 5 years ago

Reproduction link

https://mobile.ant.design/components/segmented-control-cn/#components-segmented-control-demo-basic

Steps to reproduce

import React, { Component } from 'react'
import { SegmentedControl, WhiteSpace  } from 'antd-mobile'

export default class index extends Component {
  render() {
    return (
      <div>
        <a onClick={()=> {alert('a')}}>点击</a>
        <SegmentedControl
          values={['Segment111', 'Segment222']}
          onChange={()=> {alert(1)}}
        />
      </div>
    )
  }
}

What is expected?

期望正常触发SegmentedControl的切换

What is actually happening?

SegmentedControl 点击事件偶尔触发,大部分情况下不触发, 在安卓,更高版本的ios(12.1.4)(已测试)可以正常使用

Environment Info
antd 2.2.12
React 16.8.3
System ios
Browser wechat7.0.4
awmleer commented 2 years ago

v2 已停止维护了,而 v5 中目前没有 SegmentControl 组件

这个 issue 我感觉只能关闭了,如果业务中还遇到这个问题的话,还是推荐自己在项目中实现一份 SegmentControl