ant-design / ant-design/pro-components
🐛[BUG] ModalFrom在用一个阻止冒泡的的元素当触发元素时弹出弹窗后点击任意位置触发父元素冒泡行为
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
### 🐛 bug 描述
nav(`/coupon/detail/${id}`)
}}
>
e.stopPropagation()} className="edit-icon" src={EditIcon} alt="" />}
{...{
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 18 },
},
}}
submitter={{
searchConfig: {
submitText: '确认',
resetText: '取消',
},
}}
layout="horizontal"
initialValues={{}}
onFinish={async (values) => {
console.log(values)
const { merchant_ids } = values
const params = {
coupon_campaign_id: id,
merchant_ids,
}
// const res = await bindMerchant(params)
// if (typeof res === 'undefined') return
if(props.getData) props.getData()
return true
}}
>
### 📷 复现步骤
### 🏞 期望结果
弹窗也可以阻止冒泡
### 💻 复现代码
### © 版本信息
- ProComponents 版本: ^2.7.19
- umi 版本
- 浏览器环境 google
- 开发环境 windows10
### 🚑 其他信息
Contributor guide
Research direction
Start at the ModalForm trigger behavior and reproduce the provided nested onClick example, where the parent navigates and the image calls stopPropagation(). Trace how opening and interacting with the modal handles events. Done means clicking within the modal no longer invokes the parent element's handler; add or run a focused regression test if the project provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100