Paste by using middle click in firefox not working #931

aeng opened this Issue Nov 7, 2012 · 10 comments


None yet
6 participants

aeng commented Nov 7, 2012

Middle click to paste text in CodeMirror2 doesn't work in Firefox browser but works in Chrome.


marijnh commented Nov 7, 2012

This is a known issue 1. It doesn't seem to be solveable without patching Firefox.

Instead of patching Firefox, I guess an extension may work.

@albertgasset albertgasset referenced this issue in albertgasset/dokuwiki-plugin-codemirror Apr 29, 2015


mousebuffer paste does not work #26

Since no one has linked to it already, here is the relevant bug within Firefox's Bugzilla. It looks like there are options that currently work in the developer edition of Firefox (I tried the first provided example, turned the <p> element into a <textarea> and the code worked). It appears that the FF team are still trying to make sure that the clipboard API standard gets nailed down first before this will get fixed in CodeMirror.

The bug in Firefox's Bugzilla linked to by frostyfrog was marked as resolved about a month ago, but the problem persists for codemirror. Any progress on this?


marijnh commented Mar 30, 2017

Not sure what they are supposed to have fixed there, but in Firefox nightly there's still no paste event for middle-click pasting.

frabjous commented May 3, 2017

The following minimal HTML will fire the onpaste event in Firefox 55 (linux) with a middle click:

<div width="100%" contenteditable onpaste="alert('you pasted');" >
  Middle click here

It also works on textareas, etc., even without the contenteditable attribute.

I can't figure out how to make that work for codeMirror, however, if it is possible.

@fiatjaf fiatjaf referenced this issue in sparksuite/simplemde-markdown-editor Sep 21, 2017


Mouse middle click paste does not work #583

Middle click works fine to paste in Firefox with the similar EditArea javascript editor -- Example here. How did they manage it?

lilydjwg commented Oct 26, 2017

@frabjous it's a big textarea, with all normal features like GTK editing keys available. The colorful text is laid under it.

It doesn't support multiple selections however.

nthiery commented Jan 17, 2018

A fix would be most welcome, e.g. for our teaching with Jupyter under linux.

Thanks in advance!

I'm annoyed by Jupyter not supporting middle-click paste just yesterday....There is no way to copy a value from output to the input without this feature when I've mapped Ctrl-C to interrupt the kernel instead.

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