adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.64k forks source link

Closing working file with middle-click also pastes clipboard #10473

Open ianlamb opened 9 years ago

ianlamb commented 9 years ago

I noticed a small bug that when I close a file in the side bar with middle-click it will paste my clipboard into the editor context as well.

peterflynn commented 9 years ago

Sounds like the same issue as #7216 or #6184. Does the problem go away if you choose Debug > Reload Without Extensions? If you click in a blank area of the UI (e.g. a blank part of the status bar at bottom), does it also paste? Does that occur in other apps too, or in your browser -- or is this only in Brackets?

Also, what OS are you on?

ianlamb commented 9 years ago

Strange, I wasn't noticing '$' anywhere, it was just dumping my clipboard. Could be related though.

This was on Xubuntu 14.04 LTS i386 at work. I just tried it at home on Windows 8 and can't reproduce. I can try the reload tomorrow morning and see if that fixes it.

ianlamb commented 9 years ago

I tried the Reload Without Extensions as well as restarting the entire client, I can still reproduce consistently. It's possibly a bug in Xubuntu, but I haven't noticed it happening in other text editors like Sublime.

peterflynn commented 9 years ago

@ianlamb What about this question?

If you click in a blank area of the UI (e.g. a blank part of the status bar at bottom), does it also paste?

(or does it only paste when middle-clicking a file in the sidebar, specifically)

Also, if you go to http://codemirror.net/mode/javascript/ and middle-click outside of the editor area, do you get the same behavior?

ianlamb commented 9 years ago

Clicking a blank area, such as an empty spot in the file explorer menu, it will paste if the cursor is currently focused in the text editor. If I left click to shift the focus and then middle-click it does nothing. However, no matter where the focus is closing a file always pastes at the cursor's last position. (does that make sense?)

This behaviour is not seen on the website you linked or any of my other text editors.

colin-guyon commented 9 years ago

I reproduce the same problem (OS: Linux Mint 17 Cinamon)

colin-guyon commented 9 years ago

And on this page http://codemirror.net/mode/javascript/ I also have the problem in fact

DrPandemic commented 9 years ago

I have the same problem on Arch Linux with cinnamon. And I can't reproduce this on other text editor.

peterflynn commented 9 years ago

Can someone on Linux check if inserting e.preventDefault() here or here helps?

DrPandemic commented 9 years ago

It doesn't seem to make a difference for me

peterflynn commented 9 years ago

@DrPandemic What about either of these tests? http://jsfiddle.net/7mhec30m/

DrPandemic commented 9 years ago

In both cases, it doesn't paste what I have in my clipboard