DouyinFE / semi-design

🚀A modern, comprehensive, flexible design system and React UI library. 🎨 Provide more than 3000+ Design Tokens, easy to build your design system. Make Semi Design to Any Design. 🧑🏻‍💻 Design to Code in one click
https://semi.design
Other
8.19k stars 695 forks source link

[Select] when click tag x icon, and then click other place , select always keep focus state, can't blur as expected #1248

Closed pointhalo closed 1 year ago

pointhalo commented 1 year ago

Is there an existing issue for this?

Which Component

Select

Semi Version

2.23.0-beta.0

Current Behavior

20221109163310_rec_

Expected Behavior

  1. after click other place , select can blur

same behavior as use backspace keyboard remove tag 20221109163343_rec_

Steps To Reproduce

  1. directly click tag x first (not show optionList dropdown)
  2. click code demo editor

ReproducibleCode

<Select multiple maxTagCount={2} showRestTagsPopover={true} restTagsPopoverProps={{ position: 'top' }} style={{ width: '320px' }} defaultValue={['abc', 'ulikecam', 'jianying']} >
            <Select.Option value='abc'>抖音</Select.Option>
            <Select.Option value='ulikecam'>轻颜相机</Select.Option>
            <Select.Option value='jianying'>剪映</Select.Option>
            <Select.Option value='xigua'>西瓜视频</Select.Option>
        </Select>

Environment

No response

Anything else?

No response

pointhalo commented 1 year ago

理论上 trigger combobox上绑定了 onFocus、onBlur,在不展开 optionList 的情况下,点击 x ,会触发 combobox的 onfocus(实际测试也触发了,符合预期),点击外部空白应该触发 combobox的 onblur(实际未触发,不符合预期)