Closed pointhalo closed 2 years ago
https://codesandbox.io/s/competent-glitter-5tmrc1?file=/src/App.jsx
const C = () => { const RenderContent = ({ initialFocusRef }) => { return ( <div style={{ padding: 12 }}> = <Select multiple style={{ width: '320px' }} defaultValue={['abc','hotsoon']}> <Select.Option value='abc'>抖音</Select.Option> <Select.Option value='hotsoon'>火山</Select.Option> <Select.Option value='jianying'>剪映</Select.Option> <Select.Option value='xigua'>西瓜视频</Select.Option> </Select> </div> ); }; return ( <Popover content={<RenderContent />} trigger="click"> <Button>click me</Button> </Popover> ); };
由于 #593 的修改里,将Tooltip的clickOutSide监听事件由 click -> mousedown,并且加了 capture:true,所以导致 Select 传给它所使用的Popover的 stopPropagation的不生效了(因为 mouseDown的触发会先于 click,并且这里还加了capture)
v2.10.1
Which Component 出现bug的组件
semi-ui version
Expected result 期望的结果是什么
Actual result 实际的结果是什么
Steps to reproduce 复现步骤
Reproducible code 复现代码
https://codesandbox.io/s/competent-glitter-5tmrc1?file=/src/App.jsx
Additional information 补充说明