Re: Copy to Clipboard - ambush and abuse by javascript

On Wednesday 2010-06-02 16:22 -0700, Roy T. Fielding wrote:
> While I support the notion of not messing with the cut buffer
> for UI sanity (i.e., allowing this is a browser bug), I think
> it is pointless to argue about this tool as a legitimate means
> of copy control.

I don't think it's reasonable to expect browsers to enforce user
expectations on copying given a "malicious" Web page.  There are a
large number of ways to hide text, such as positioning it offscreen,
using a very small font size, making it alternate content for a
small image, positioning other content on top of it, etc.  And we
certainly still want to allow copying of text that's offscreen so
users can copy large pieces of text.

The ability to manipulate what a user is copying is also important
for applications on the Web.  If you're using a Web app like Google
Docs, you want copy to copy a useful representation, not the
internal representation that the editor uses.  If you're copying
data from a spreadsheet that auto-formats numbers by inserting
commas every three digits in the displayed value, you may well want
to copy the value without the displayed commas that are not really
part of the data, just part of the display.  For some more examples,
see https://bugzilla.mozilla.org/show_bug.cgi?id=280959#c6 .

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Saturday, 5 June 2010 02:28:09 UTC