重复触发 onPopupVisibleChange
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Start from the Trigger usage shown in the issue and reproduce the mobile-trigger click sequence with popupVisible and mask enabled. Trace the onPopupVisibleChange calls, including the FastClick setup, and confirm that one click closes the menu without immediately reopening it.
Written by the indexing model from the issue text.
Description
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)
- Dominant language
- TypeScript
- Stars
- 391
- Forks
- 245
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-component/trigger
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
react-component/trigger#593 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
react-component/trigger#623 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
react-component/trigger#618 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
react-component/trigger#555 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
react-component/trigger#550 · 1 comment ·
All issues in react-component/trigger
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·