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

键盘事件可以 stopPropagation 吗? #81

Closed
jinliming2 opened this issue Oct 16, 2019 · 4 comments
Closed

键盘事件可以 stopPropagation 吗? #81

jinliming2 opened this issue Oct 16, 2019 · 4 comments

Comments

@jinliming2
Copy link

键盘事件 esc 被上层 DOM 触发,导致外层的 DOM 被关闭。

键盘事件如果是被 viewer 成功触发的话,应该阻止继续冒泡。

但是现在事件好像是直接绑在 body 上的,这个能调整一下吗?

@infeng
Copy link
Owner

infeng commented Oct 17, 2019

可以给一个重现的demo吗

@jinliming2
Copy link
Author

jinliming2 commented Oct 17, 2019

https://codesandbox.io/s/laughing-https-34bj9

按键盘 esc 键关闭 Viewer 会同时关掉上层的 Drawer

@infeng
Copy link
Owner

infeng commented Oct 17, 2019

v2.11.1 修复了这个问题

@infeng infeng closed this as completed Oct 17, 2019
@infeng
Copy link
Owner

infeng commented Oct 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants