使用wangEditor富文本编辑器在移动端中打开页面的时候,总会自动定位到富文本编辑器上,弹出移动端的虚拟键盘,影响到整体布局的兼容问题。
// 取消自动focus且禁止虚拟键盘弹出
const editor = new E('#div1')
editor.create()
document.activeElement.blur();
ts的话需要转换下类型 (document.activeElement as HTMLInputElement).blur()
使用wangEditor富文本编辑器在移动端中打开页面的时候,总会自动定位到富文本编辑器上,弹出移动端的虚拟键盘,影响到整体布局的兼容问题。
// 取消自动focus且禁止虚拟键盘弹出
const editor = new E('#div1')
editor.create()
document.activeElement.blur();
ts的话需要转换下类型 (document.activeElement as HTMLInputElement).blur()