Hacker News new | ask | show | jobs
by dmitrygr 1854 days ago
> Web applications developer KNOW THE CONTEXT OF THEIR USE CASE

I'll believe this when web sites stop disabling paste

3 comments

Another thing browsers should not allow the page to override.
You need it for google docs, etc to intercept paste events and do the right thing from the perspective of a document editor.

But this also illustrates the fact that "useful" browser features can be trivially abused.

That's an interesting point. I could see the feature looking like:

- Allowing a page to intercept a paste.

- If the page doesn't modify the DOM in response, then override it and actually paste the content.

Still trivial to bypass.
Maybe, but it might block the common case of "well intentioned developer breaks the built-in functionality without realizing it".
Is that really a common case when paste is disabled? I can't recall ever coming across it where it wasn't obvious that it was intentional.
There's an extension called "Don't fuck with paste" which disables intercepting paste, not sure how. You have to remember to add sites that you do want to intercept paste (mostly rich text apps) to the whitelist.
And copy. And right click. And text selection.
Firefox ignores the right click overrides if you hold down shift. I'm not sure about text selection, but there's probably a way to do that as well. I haven't found a bypass on Chrome yet, though.

As for copy, I often find that the less common copy/paste commands (ctrl/shift+insert) still work when control+c/v have been intercepted. Sometimes adding an extra key also works (ctrl+shift+c). I theorize that this is because a lot of the times copy/paste is disabled, the incompetence of the people deciding on and building in the anti feature drips all the way down to the JS implementation.

> I'm not sure about text selection, but there's probably a way to do that as well

Sure. It's usually some CSS rule that can be easily turned off. These things are still extremely annoying though. We should not have to fix people's sites.