可能是 Copy on select 导致的?在从一个note上拉出箭头,在另一个note上停留1s后出现。
Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
at handleNativeOrMenuCopy (widget.js:1:928062)
at HTMLDocument.r (widget.js:1:929222)
at a (copy-on-select.js:1:1100)
var handleNativeOrMenuCopy = t=>{
var r = t.getContentFromCurrentPage(t.getSelectedShapeIds());
if (r) {
var i = (0,
import_lz_string.compressToBase64)(JSON.stringify({
type: "application/tldraw",
kind: "content",
data: r
}));
if ("undefined" != typeof navigator) {
r = r.shapes.map(e=>t.isShapeOfType(e, "text") || t.isShapeOfType(e, "geo") || t.isShapeOfType(e, "arrow") ? e.props.text : t.isShapeOfType(e, "bookmark") || t.isShapeOfType(e, "embed") ? e.props.url : null).filter(isNonNull);
if (null != (n = navigator.clipboard) && n.write) {
var n = new Blob(["<tldraw>".concat(i, "</tldraw>")],{
type: "text/html"
});
let e = r.join(" ");
"" === e && (e = " "),
navigator.clipboard.write([new ClipboardItem({
"text/html": n,
"text/plain": new Blob([e],{
type: "text/plain"
})
})])
} else
navigator.clipboard.writeText && navigator.clipboard.writeText("<tldraw>".concat(i, "</tldraw>"))
}
} else
navigator && navigator.clipboard && navigator.clipboard.writeText("")
}
可能是 Copy on select 导致的?在从一个note上拉出箭头,在另一个note上停留1s后出现。