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

Press Enter on a button will trigger the click event twice #1626

Closed
wghglory opened this issue Nov 19, 2021 · 1 comment
Closed

Press Enter on a button will trigger the click event twice #1626

wghglory opened this issue Nov 19, 2021 · 1 comment
Labels
bug Something isn't working consideration-needed

Comments

@wghglory
Copy link

TuSimple/naive-ui version (版本)

2.20.3

Vue version (Vue 版本)

3.2.22

Browser and its version (浏览器及其版本)

Edge 80

System and its version (系统及其版本)

MacOS 10.15.7

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/nervous-morning-tpnof?file=/src/Demo.vue

Reappearance steps (重现步骤)

https://codesandbox.io/s/nervous-morning-tpnof?file=/src/Demo.vue.

Keyboard press enter will trigger the click event twice.

Expected results (期望的结果)

should trigger only once

Actual results (实际的结果)

redundant triggering

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Nov 19, 2021
@wghglory
Copy link
Author

I'm guessing both keyup and keydown are triggered. If I keep pressing down the enter key, the click event will execute all the time. I think it should execute only once for a long press.

@XieZongChen XieZongChen added consideration-needed and removed untriaged need to sort labels Nov 20, 2021
@07akioni 07akioni added the bug Something isn't working label Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working consideration-needed
Projects
None yet
Development

No branches or pull requests

3 participants