Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Select onBlur 失效 #1110

Closed
1 task done
zwlafk opened this issue Sep 7, 2022 · 2 comments · Fixed by #1111
Closed
1 task done

[BUG] Select onBlur 失效 #1110

zwlafk opened this issue Sep 7, 2022 · 2 comments · Fixed by #1111
Assignees
Labels
bug Something isn't working

Comments

@zwlafk
Copy link
Collaborator

zwlafk commented Sep 7, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Which Component

Select

Semi Version

latest

Current Behavior

失去焦点未触发onBlur
20220907184533

Expected Behavior

No response

Steps To Reproduce

可在官网复现

import React from 'react';
import { Select } from '@douyinfe/semi-ui';

() => (
    <>
        <Select onBlur={() => console.log('blur!')} defaultValue='abc' style={{ width: 120 }}>
            <Select.Option value='abc'>抖音</Select.Option>
            <Select.Option value='ulikecam'>轻颜相机</Select.Option>
            <Select.Option value='jianying' disabled>剪映</Select.Option>
            <Select.Option value='xigua'>西瓜视频</Select.Option>
        </Select>
    </>
);

ReproducibleCode

No response

Environment

- OS:
- browser:

Anything else?

No response

@pointhalo
Copy link
Collaborator

v2.17 对 Select 的 A11y 做了键盘和焦点支持改造。

有蓝色border的情况下,代表此时select还是聚焦的。只点击 option的情况下,焦点还是在trigger上的,可以通过键盘再进行打开。点击了外部的时候才是真正失焦,此时会触发 onblur。

image

@zwlafk
Copy link
Collaborator Author

zwlafk commented Sep 8, 2022

v2.17 对 Select 的 A11y 做了键盘和焦点支持改造。

有蓝色border的情况下,代表此时select还是聚焦的。只点击 option的情况下,焦点还是在trigger上的,可以通过键盘再进行打开。点击了外部的时候才是真正失焦,此时会触发 onblur。

image

现在点外部是不触发失焦的,我看已经有修复的PR了~

@YannLynn YannLynn added the bug Something isn't working label Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants