4 ms·
> Web pages shouldn't be able to modify my selection. Why is there even an API for this? To make “copy to clipboard” buttons possible.
by xigoi 3y ago
> Web pages shouldn't be able to modify my selection. Why is there even an API for this?
To make “copy to clipboard” buttons possible.
- dotancohen 3y agoDoes not sound like a worthwhile trade-off.
- ndriscoll 3y agoI have a copy to clipboard button that's standard across all apps and has decades of precedence: Ctrl+c. Some (older?) keyboards even label it! On my phone, if I select text, my browser pops up a menu with "copy" as an option. Why does a web page need to reinvent that wheel? For the 1/10000000 case where it makes sense, how about a "X page wants to modify your clipboard" dialog? This has been a known security vulnerability for at least a decade. Edit: actually, I just noticed that was a reply to selection, which makes even less sense. Just let the user select what they want.
- xigoi 3y agoWhen copying Unicode characters from sites like symbl.cc, it would be incredibly annoying to have to select them and press Ctrl+C instead of just pressing a single button.
- bee_rider 3y agoCtrl-c sends the interrupt signal. Remembering that in normal use (terminal) it sends interrupt, except for this one program (Firefox) where it copies would be pretty confusing and annoying.
- ndriscoll 3y agoIncorrect pedantry that ignores decades of established convention with GUI applications aside, the same incorrect behavior happens when you select, right click, and choose "copy". Any normal person would expect that it copies what you selected, and doesn't let the page instead place whatever it wants to into the clipboard. The user tells their computer to do a simple thing, and the computer adversarially does not do that thing, and instead obeys someone else, intentionally. That should not happen.