Any time the demarcation between "remote page" and
"browser UI" is blurred, problems such as "phishing"
attacks become easier.
Hugely important; largely ignored.Unfortunately, people whose training and experience exists only inside a browser either don't or can't see beyond those confines and the result is reimplementing perfectly adequate external functionality.
Sometimes I am doing something on the CLI and go back to the terminal and paste a text I copied from somewhere.
If the text is multiline my terminal will consume the lines without requiring an extra 'enter / return' key press.
Another possibility is copying something to web mail client without noticing there's something suspicious about it (JS isn't the concern here anymore nowadays, but loading stuff like images is a privacy concern).
However, this issue MUST be fixed at browser level. And when used without destroying user expectations / UX, this plugin is useful.
Malicious attacks are going to happen anyways if the browser permit such action to happen, so don't blame the plugin or the plugin writer. The browsers are broken. Ask the major browser developers to either never allow it to happen (like Safari does) or ask them to ask for permission (like for webcams) or add a confirmation modal.
A trivial compromise that would be even easier to use than the current javascript/selection stuff would be a "copy to clipboard" variant of the <button> tag. Something like this should satisfy the use-cases where this clipboard nonsense is occasionally useful:
<form>
<input name="copy_souce" type="text" value="xyzzy" />
<button type="clipboard" value="copy_source"
name="Copy To Clipboard" />
</form>
This wouldn't require any Javascript, and leaves the clipboard entirely under the control of the user where it belongs.This could even be extended to allow copying of the various types of input tags, and if you wanted to get fancy, the button could reference an #id and copy that element's textContent (or innerHTML).
I know it's only existed on desktop computers since the Apple Lisa, and 30 years isn't very long for people to grasp the concept of copy and paste without a button to do it, but I have faith in people.
Maybe a small modal-like confirmation that can be placed anywhere on the viewport and is actually on top of everything natively (like Safari's copy/paste on iOS).
Of course, this modal-like confirmation must not be customized or its effect is useless.
Or let's just forget entirely and remove the functionality from the browsers.
The discussion really should focus on how well apps degrade, which is really reaffirming that progressive enhancement is still the best approach to building web apps. While only a small percentage of users have intentionally disabled JavaScript entirely, it's effectively disabled for everyone while it's downloading and a larger percentage of users (particularly on mobile) will have errors which prevent those downloads entirely. If you build a rich application which still has the core functionality working, you've done a much better job than the people who make sites which take minutes or don't even render when their shiny framework hits a non-perfect network connection.
Stop trying to give webpages control - any control at all - over the browser UI. The page gets to control just that (the page) and the framework around that page (the browser). Any violation of this a potential security problem. Any time the demarcation between "remote page" and "browser UI" is blurred, problems such as "phishing" attacks become easier.
If you want fancier UI than is possible from a web page, write a native app.