13

Under Linux / FreeBSD, you can select an area on a terminal (or pretty much anything with text) and then middle mouse button click in a textarea to paste the select text.

This works perfectly on the main SO question and answer texarea fields.

On the Stack Snippet Editor this does not work at all.

I'm guessing the Stack Snippet Editor is pretty complex and the middle mouse button may not function because of this complexity, but if it is a quick fix (haha, when does that happen) it would be great.

Note: Added the bug tag as I'm not sure if the Stack Snippet Editor is working as expect or not.

2
  • 2
    I'm pretty sure there is no magic added to support a middle click anywhere on the sites. What might be working is that your browser/linux distro is capable of offering extra functions when the click is an textarea. Stack Snippets don't use a TextArea as their primary inputfield. They handle key and mouse events all by them selves. So I doubt that is a bug. As a feature it is not important to me, My mouse has only two buttons.
    – rene
    Aug 7, 2016 at 8:22
  • 1
    the snippits editor is horribly broken in several places. I wish there was some indication they were being fixed. I run into the issues daily
    – gman
    Aug 7, 2016 at 14:21

1 Answer 1

13

Stack Snippets use a CodeMirror control (implemented in JavaScript and MIT-licensed) for the editor, rather than a standard textarea. As rene mentioned, this is a bonus feature that your browser (not the operating system) implements for standard text-input controls. It doesn't recognize the CodeMirror control as a standard text-input control, so it isn't providing this functionality.

This isn't limited to Stack Exchange sites. It's something that would need to be explicitly coded up for the CodeMirror control. The bug has already been reported here. And here, here, and here.

If you're handy with JavaScript, and this bothers you, you might consider going in and fixing it yourself. Stack Overflow can then pull in your latest changes.

This is one of the standard things that goes wrong when you write custom controls, instead of using the built-in ones. You miss out on all the nice features that the standard controls get for free. Happens all the time to hapless Windows developers. In this case, though, using the CodeMirror control instead of the standard textarea control is actually adding significant value in terms of features and usability, so it's probably worth this little sacrifice.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .