Bug 227671

Summary: "Copy message link" option doesn't work in Discord web version
Product: WebKit Reporter: Kostya <kkruglov>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: gsnedders, jond, megan_gardner, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Apple Silicon)   
OS: macOS 11   
Attachments:
Description Flags
screen recording of the issue none

Kostya
Reported 2021-07-04 04:18:58 PDT
Created attachment 432860 [details] screen recording of the issue Safari Version 14.1.1 (16611.2.7.1.4) 1. Open web version of Discord 2. Find any server, join it, find any message 3. Use "copy message link" option on any message What happens 1. Link to the messsage (url) doesn't copy to clipboard What should happen 1. Link to the message (url) copies to the clipboard
Attachments
screen recording of the issue (15.34 MB, video/quicktime)
2021-07-04 04:18 PDT, Kostya
no flags
Kostya
Comment 1 2021-07-04 04:20:32 PDT
I'm not a developer, so put this bug into Evangelism component. Sorry if it's a wrong way of doing things.
Sam Sneddon [:gsnedders]
Comment 2 2021-07-04 17:29:36 PDT
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 }
Radar WebKit Bug Importer
Comment 3 2021-07-04 17:29:50 PDT
Sam Sneddon [:gsnedders]
Comment 4 2021-07-05 08:51:47 PDT
Oh, no, that's wrong. The function works fine (though Web Inspector console doesn't count as a user gesture, perhaps?). Caused by having requestAnimationFrame in the stack. *** This bug has been marked as a duplicate of bug 223775 ***
Note You need to log in before you can comment on or make changes to this bug.