trigger icon indicating copy to clipboard operation
trigger copied to clipboard

重复触发 onPopupVisibleChange

Open jamieYou opened this issue 7 years ago • 1 comments

onPopupVisibleChange(popupVisible) {
    this.setState({ popupVisible })
}

  <Trigger
    action={['click']}
    popup={this.renderMenu('inline')}
    popupAlign={{
      points: ['tl', 'bl'],
      offset: [0, 3]
    }}
    popupVisible={this.state.popupVisible}
    onPopupVisibleChange={::this.onPopupVisibleChange}
    mask
    destroyPopupOnHide
  >
    <div className="mobile-trigger">
      <Icon type="bars"/>
    </div>
  </Trigger>

里面的 mobile-trigger 点击后展开菜单。然后再点击后应该关闭的。但是却重复触发了事件,导致关闭后立刻打开了。

感觉像是点击穿透问题, fastclick 也用了,也无效。

document.addEventListener('DOMContentLoaded', () => FastClick.attach(document.body), false)

jamieYou avatar Apr 05 '18 14:04 jamieYou

Could you reproduce your issue on https://codesandebox.io?

yesmeck avatar Apr 11 '18 09:04 yesmeck