[Webkit-unassigned] [Bug 227671] "Copy message link" option doesn't work in Discord web version
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jul 4 17:29:36 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=227671
Sam Sneddon [:gsnedders] <gsnedders at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gsnedders at apple.com,
| |megan_gardner at apple.com,
| |rniwa at webkit.org,
| |wenson_hsieh at apple.com
Component|Evangelism |HTML Editing
Assignee|jond at apple.com |webkit-unassigned at lists.web
| |kit.org
--- Comment #2 from Sam Sneddon [:gsnedders] <gsnedders at apple.com> ---
This, called with a string, seems not to cause the string to be copied to the clipboard Safari 14.1.1:
function copy(e) {
var t = document.body;
if (null == t)
throw new Error("[Utils] ClipboardUtils.copy(): assert failed: document.body != null");
var n = document.createRange(),
r = window.getSelection(),
i = document.createElement("textarea");
i.value = e,
i.contentEditable = "true",
i.style.visibility = "none",
t.appendChild(i),
n.selectNodeContents(i),
null == r || r.removeAllRanges(),
null == r || r.addRange(n),
i.focus(),
i.setSelectionRange(0, e.length);
var o = document.execCommand("copy");
return t.removeChild(i), o
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210705/048fb1d6/attachment.htm>
More information about the webkit-unassigned
mailing list