提交 5c0d6085 编写于 作者: D DCloud_LXH

fix(h5): setClipboardData 会弹起键盘 fixed #3569

上级 1a09f753
......@@ -26,8 +26,8 @@ export function setClipboardData ({
textarea.style.zIndex = '-9999'
document.body.appendChild(textarea)
textarea.value = data
textarea.focus()
textarea.select()
textarea.setSelectionRange(0, textarea.value.length)
const result = document.execCommand('Copy', false, null)
textarea.blur()
if (result) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册