New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dom.event.clipboardevents.enabled is required to get copy/paste working on Google Docs #287

Open
fmarier opened this Issue May 1, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@fmarier
Copy link
Contributor

fmarier commented May 1, 2017

For copy/paste to work on Google Docs using the keyboard (Ctrl+C, Ctrl+X, Ctrl+V), it needs dom.event.clipboardevents.enabled to be enabled.

We could however disable dom.allow_cut_copy (introduced in https://bugzilla.mozilla.org/show_bug.cgi?id=1170911) since that appears to only be required for using the clipboard using the mouse UI.

I'm not sure what the best path forward is here, but here are ideas:

  • adding a comment to mention keyboard clipboard operations next to the dom.event.clipboardevents.enabled pref
  • commenting it out the pref by default to prevent breakage
  • adding dom.allow_cut_copy = false by default to prevent sites from tampering with the clipboard contents
@Thorin-Oakenpants

This comment has been minimized.

Copy link

Thorin-Oakenpants commented May 1, 2017

here is what ghacks user.js has had for ages

/* 2402: disable website access to clipboard events/content
 * [WARNING] This will break some sites functionality such as pasting into facebook, wordpress
 * this applies to onCut, onCopy, onPaste events - i.e you have to interact with
 * the website for it to look at the clipboard
 * [1] http://www.ghacks.net/2014/01/08/block-websites-reading-modifying-clipboard-contents-firefox/ ***/
user_pref("dom.event.clipboardevents.enabled", false);
/* 2403: disable clipboard commands (cut/copy) from "non-privileged" content (FF41+)
 * this disables document.execCommand("cut"/"copy") to protect your clipboard
 * [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1170911 ***/
user_pref("dom.allow_cut_copy", false); // (hidden pref)

IMO, a "hardened" user.js (guess it depends on what is meant by hardened) should note breakage, not bend to it re dom.event.clipboardevents.enabled . I know google docs requires it, so does Facebook (you can't paste into FB otherwise). Sure, these sites (google docs?) require you to be logged in, so it's not about your ID. On FB, the reason they do this is to monitor everything you type/paste, even if you don't post it, or then edit it before posting. Wordpress, as mentioned is another one.

@nodiscc

This comment has been minimized.

Copy link
Contributor

nodiscc commented May 1, 2017

dom.allow_cut_copy was added in #277, set to false, as @Thorin-Oakenpants noted we should keep enforcing false for both, but is definitely something to consider for a relaxed variant/branch #231 (set both prefs to true)

nodiscc added a commit to nodiscc/user.js that referenced this issue May 1, 2017

@Thorin-Oakenpants

This comment has been minimized.

Copy link

Thorin-Oakenpants commented May 2, 2017

==Slightly OT==
If you are afraid of breakage, then you should revisit your svg.disabled=>true (even we disabled enforcing this), as it breaks youtube player controls. SVG is just too big a part of the internet. It's a FF53+ pref FYI. It must be sitting in a PR, but I can't find it @nodiscc

@nodiscc

This comment has been minimized.

Copy link
Contributor

nodiscc commented May 2, 2017

SVG

#276

If you are afraid of breakage, then you should revisit

#231 :)

nodiscc added a commit to nodiscc/user.js that referenced this issue Jun 12, 2017

ranisalt added a commit to ranisalt/user.js that referenced this issue Jul 18, 2018

ranisalt added a commit to ranisalt/user.js that referenced this issue Jul 18, 2018

ranisalt added a commit to ranisalt/user.js that referenced this issue Jan 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment