codesandbox-client
codesandbox-client copied to clipboard
Closing a file with the middle mouse button pasts the content of the clipboard to the focused file
🐛 bug report
Preflight Checklist
- [x] I have read the Contributing Guidelines for this project.
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.
Description of the problem
It seems that whenever closing an open file using the middle mouse button click, the contents of the clipboard are pasted into the file which is currently focused. Note that this does not happen with text copied from an open file, but does happen with text copied from outside the editor (e.g. copying text from the rendered page, copying text from external program). If I copy text from an open codesandbox editor file, this does not get pasted, but rather the text that I had previously copied gets pasted.
See screen recording
How has this issue affected you? What are you trying to accomplish?
It's still possible to close the file in a few other ways (clicking the x, right click + close), and these approaches dont suffer from this issue, but I'm in the habit of using the middle-mouse button to close tabs and keep doing it automatically. I just need to Ctrl + z to undo the unintentional paste and I'm back on track.
To Reproduce
- Create new sandbox (any template will do)
- Open multiple files, so you have multiple tabs open in the editor
- Copy some text from outside the program (e.g. copy some text from this bug report)
- Middle-mouse click one of the file tabs in codesandbox
- Clipboard content is pasted into the file that remains open
Link to sandbox: link (optional)
I'll omit this since it's happening on every sandbox I've created (note that I'm fairly new to this product and in all honest have only created a few sanboxes)
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | 595ab751a |
| Browser | Firefox Mozilla Firefox 114.0.2 |
| Operating System | Linux Mint 21.1 |