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

Android Webview 无法动态注入 vConsole.min.js #546

Closed
strange-qwq opened this issue Jun 14, 2022 · 1 comment
Closed

Android Webview 无法动态注入 vConsole.min.js #546

strange-qwq opened this issue Jun 14, 2022 · 1 comment
Labels
Details wanted Need more details Done

Comments

@strange-qwq
Copy link

vConsole Version: 3.14.6

错误内容:
点击vConsole浮窗AS控制台报错:Unable to preventDefault inside passive event listener invocation.,且没有弹出网页控制台

复现步骤:
1.直接注入script标签或下载http://cdn.jsdelivr.net/npm/vconsole@3.14.6/dist/vconsole.min.js到安卓本地并使用evaluateJavascript方法读取js均可;
2.使用loadUrl方法执行new VConsole();
3.点击出现的VConsole浮窗

关键代码:
image

Maizify added a commit that referenced this issue Sep 21, 2022
@Maizify Maizify added Details wanted Need more details Done labels Sep 21, 2022
@Maizify
Copy link
Collaborator

Maizify commented Sep 21, 2022

我这里本地没有条件验证。根据这个 error 的表现,应该是 touch 事件中使用了 preventDefault() 引起的,因此这里尝试强制使用 passive: false 模式来避免报错。楼主可以试下这个版本。

@Maizify Maizify closed this as completed Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Details wanted Need more details Done
Projects
None yet
Development

No branches or pull requests

2 participants