Strange text grabbing behavior in IDEA
Recently, I've noticed IntelliJ IDEA grabbing text when it is not intended. This is especially annoying since I tend to highlight code as I'm reading it. The result is a chunk of code gets dragged around and pasted elsewhere in the file.
Reproduction steps are simple (for me, at least):
* Place cursor somewhere
* Start highlighting somewhere a few lines above the cursor
* Watch a hunk of code get cut and pasted
Video demo: https://www.youtube.com/watch?v=WmS_e-WoJNo
Observations:
* Only happens when you click near the cursor position
* Only happens when you click above the cursor position
Version info:
IntelliJ IDEA 2017.1.3
Build #IU-171.4424.56, built on May 12, 2017
Licensed to David Arthur
Subscription is active until February 9, 2018
JRE: 1.8.0_112-release-736-b21 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.5
请先登录再写评论。
Does it help if you disable editor drag'n'drop?
Yes! That did it, thanks!
Although my main issue has been resolve, I still see the editor highlighting unexpected chunks of code. With drag-and-drop disabled it doesn't actually grab those chunks, but I definitely still see the same unexpected selection of code.
Please provide a video.
You can see a few instances of it here: https://www.youtube.com/watch?v=3OGTTVIE2K4
With drag-and-drop disabled, it immediately releases the chunk, so it just flashes the highlight for a moment.
Do you have any third-party plugins installed in IDEA? Do you have any mouse- or keyboard-related software installed on your system?
Can't think of any IDEA plugins that would be mouse/keyboard related. For OS X, I do have MagicPrefs installed and use a Magic Mouse
I could reproduce this with MagicPrefs installed (with either Magic Mouse or normal mouse).
Raised https://youtrack.jetbrains.com/issue/JRE-393 for this issue.
Thank you for the information guys, I've been facing the same issue, almost driven me crazy. It's the kind of problem even hard to search for online, as describing the behaviour is tricky in itself too.
Just for anyone who is facing the same issue:
Unfortunately the issue is not fixed yet, but since MagicPerfs is EOL anyway and won't work at all from High Sierra it's probably a better idea to look for a replacement.
I'm testing a similar utility called Better Touch Tool now, and it seems to provide the same features as MagicPerfs (at least those I'd been using) and it works perfectly with IntelliJ IDEA!
Serge Baranov Are you god? Thanks :)
I have been experiencing something like this too, as others have said it is hard to describe and it only happens occasionally. I am a new user and it is driving me insane, it's almost making me go back to using Eclipse. I have no plugins installed.
I have just disabled the editor drag and drop so hopefully that helps.
Same here, but only started happening with the new update, in just some parts of the code:
PyCharm 2020.2.2 (Community Edition)
Build #PCA-202.7319.64, built on September 16, 2020
Runtime version: 11.0.8+10-b944.31 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Registry: debugger.watches.in.variables=false
In the meantime I disabled the drag-and-drop to avoid accidents.
Bernamdc Do you have Settings (Preferences on macOS) | Editor | General | Move code fragments with drag-and-drop option enabled? Have you tried to disable it?
Konstantin Annikov as I said at the end of my comment, yes, I disabled it, and that avoids the problem :)
I have just started having similar problems. I've disabled drag and drop which makes the issue less destructive but still nearly crippling. It's very difficult to select more than a few lines of text using the mouse.
The thing I see most often is if I'm trying to select multiple lines, starting lower in a file and moving upward, the cursor will periodically drop the bottom half of my selection and begin selecting from the top :-(
Overall, I'm sad to say the last few releases of this product have all been increasingly unstable and buggy :-(
I am using using:
Big Sur: 11.5.1
IntelliJ IDEA 2021.2 (Ultimate Edition)
I man not using anything that messes with mouse or keyboard behavior (I was using Karabiner and BetterSnap, but disabling them has not fixed this issue).
@... Tried reproducing on Mac OS 11.5.2 in IDEA 2021.2.1 with Magic Mouse - no luck.
Do you see this in all file types opened in Editor or only certain types are affected?
Does this still happen in 2021.2.1? If it does, please file a new issue in our tracker and share the screencast demonstrating the wrong behavior.
I found one cause of the same problem or a similar thing I had on my laptop. It was crippling the coding/debugging.
The issue: Mouse hovering unintentionally, selecting , highlighting texts by itself, to the worse coding area starts sliding down/up and it couldn't be stopped. Output terminal started sliding up/down in the same way when mouse is over it.
Reinstalling pcharms didn't help.Touching the touch screen of laptop didn't help. Changing the settings of mouse/cursor on laptop and on Pcharm mouse settings didn't help.
fix : The issue somehow started after using extra 2 monitors. ? Today, I just unplugged the extra screens(or hub cable reaching to them), only having laptop screen, it WORKED, normal regular coding area back. Then I connected screens again and moved pycharm page there, it was normal and working nice. I think this is still a bug and fixation might be a temporary solution before it relapses. However, no problem so far.
bye
I've run into this issue on IntelliJ 2022.3.1. I've just discovered this ticket and I haven't yet tried disabling the drag-and-drop feature. Hopefully that'll help.