We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
点击图片,还是弹出键盘了。有一个体验比较不好的地方,就是点击删除图片的叉叉时,弹出键盘了。是不是可以在点击删除事件那里stop和prevent一下,看样子时点击穿透了。
The text was updated successfully, but these errors were encountered:
也遇到同样的问题,但是下载代码本地运行,微信浏览器,qq浏览器、google浏览器都没有这个问题。自己的代码在微信浏览器、google浏览器都会唤起键盘,只有在qq浏览器不会唤起,不知道是啥原因
Sorry, something went wrong.
之前也以为是冒泡事件的锅,看来源代码,其实是有阻止事件冒泡的。发现是contenteditable的锅。看了源码,在点击图片或是删除按钮的时候是传出了一个click事件的,可以在此时使元素失去焦点(blur)。我的代码如下,测试是可用的。(我的事件里又判断判断了一次,应该也可以不用判断) zxEditor.on('click', function(dom, e) { if (e.target.nodeName.toLowerCase() === 'i' || e.target.nodeName.toLowerCase() === 'img') { document.querySelector('.zxeditor-content-wrapper').blur(); } });
No branches or pull requests
点击图片,还是弹出键盘了。有一个体验比较不好的地方,就是点击删除图片的叉叉时,弹出键盘了。是不是可以在点击删除事件那里stop和prevent一下,看样子时点击穿透了。
The text was updated successfully, but these errors were encountered: