WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146336
Implement unprivileged execCommand("copy") and execCommand("cut")
https://bugs.webkit.org/show_bug.cgi?id=146336
Summary
Implement unprivileged execCommand("copy") and execCommand("cut")
Alan Tam
Reported
2015-06-25 18:41:37 PDT
Created
attachment 255609
[details]
Test case Chrome 43 decides that allowing the website to pollute your clipboard inside _any_ DOM event handler is no longer a concern.
http://codetheory.in/javascript-copy-to-clipboard-without-flash-using-cut-and-copy-commands-with-document-execcommand/
Can WebKit consider allowing the same? Test case attached.
Attachments
Test case
(597 bytes, text/html)
2015-06-25 18:41 PDT
,
Alan Tam
no flags
Details
Patch
(24.41 KB, patch)
2016-03-13 20:58 PDT
,
Sam Weinig
dino
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2015-06-29 19:41:30 PDT
Letting webpages _write_ into the clibpard while the user is interactiving with the page seems okay.
Alan Tam
Comment 2
2015-06-30 13:49:46 PDT
Yes, writing only. Looks like this will be implemented in Firefox 41 too.
https://bugzilla.mozilla.org/show_bug.cgi?id=1012662
Alan Tam
Comment 3
2015-06-30 15:54:09 PDT
FWIW, the Chrome issue is here:
https://code.google.com/p/chromium/issues/detail?id=424968
Radar WebKit Bug Importer
Comment 4
2016-01-26 14:01:07 PST
<
rdar://problem/24354406
>
David Kilzer (:ddkilzer)
Comment 5
2016-01-26 14:01:51 PST
This would allow Github.com to stop using Flash on WebKit: <
https://twitter.com/davidgraham/status/692075210435010561
>
Alexey Proskuryakov
Comment 6
2016-01-26 14:12:06 PST
There is certainly no shortage of websites that are using Flash for this purpose, github possibly not even being the most prominent. Personally, I'm not looking forward to a world in which advertisers put their content on my pasteboard each time a click a webpage.
Sam Weinig
Comment 7
2016-03-13 20:58:06 PDT
Created
attachment 273921
[details]
Patch
WebKit Commit Bot
Comment 8
2016-03-13 20:59:37 PDT
Attachment 273921
[details]
did not pass style-queue: ERROR: Source/WebCore/editing/EditorCommand.cpp:1177: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 9
2016-03-13 21:43:43 PDT
Committed
r198092
: <
http://trac.webkit.org/changeset/198092
>
Adam Roben (:aroben)
Comment 10
2016-03-14 07:21:15 PDT
Yay! Thanks Sam!
Sam Weinig
Comment 11
2016-03-15 17:01:32 PDT
(In reply to
comment #10
)
> Yay! Thanks Sam!
My pleasure! Any chance we can get Github updated to check document.queryCommandSupported("copy") to add the copy button :).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug