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

第二次点击控制台时 blur 事件没有触发 #10

Open
void1005 opened this issue Sep 17, 2021 · 0 comments
Open

第二次点击控制台时 blur 事件没有触发 #10

void1005 opened this issue Sep 17, 2021 · 0 comments

Comments

@void1005
Copy link

问题描述:

如何触发窗口blur: 切换tab页 / 点击控制台区域 / 点击其他窗口

Mac系统下window.blur无法重复触发的问题, 复现步骤: 进入页面首先右键点击弹出菜单组件, 然后触发窗口blur, 然后再右键点击弹出菜单组件(不要点左键), 然后第二次就无法触发窗口blur

image

推测原因:

应该是鼠标右键无法触发窗口的onfocus事件, 也就意味着只点击右键无法激活窗口, 窗口没激活自然blur也就无法触发

尝试解决:

尝试在点击右键的时候调用window.focus(), 但没有任何效果, 第二次blur依旧无法触发

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

1 participant