Stop JavaScript from modifying the clipboard in Firefox

Did it ever happen to you that you copied text from a webpage and when you pasted the text it was modified, or nothing at all appeared? This happens because the page in question executes JavaScript code that modifies the clipboard.

To avoid that, you can disable JavaScript or change your Firefox settings this way:

  1. Type about:config in the address bar.
  2. Press Enter and then the button Accept the Risk and Continue.
  3. Type dom.event.clipboardevents.enabled in the search box.
  4. Double-click on that preference, or press its Toggle button to change its value to false.

It should look like this

This way, the web pages you visit will not be able to modify your clipboard. Note that some web applications that modify the clipboard with JavaScript (such as Collabora) will no longer be able to do this, so their paste functionality will no longer work properly.

Comments