Mouse acting like left button is held down in some programs

I am using Ubuntu 18.04.1 on a Dell XPS 13 (9370).

In certain programs the left mouse button is acting as if it is being constantly held down. So when moving over a block of text it is highlighting the text. Making that particular program almost unusable. This is happening with both the built in touchpad and when using an external mouse.

So far this has happened to me in Spyder and VirtualBox. But this question is describing the same problem in RStudio.

I've found evidence of this issue effecting some people all the way back to Ubuntu 9.10 but with no solution ever presented.

It would seem that the behavior is consistent with BTN_LEFT having a value of 1 constantly (in that program). But using evtest to investigate the value of BTN_LEFT doesn't show up anything out of the ordinary. The BTN_LEFT value is set to 1 when I left click and 0 as soon as I release.

Any help would be greatly appreciated!


I see this behavior with current versions of VirtualBox (6.0.12). It seems to occur only when using the laptop screen, which is a touchscreen. The problem goes away once the touchscreen is disabled in the laptop's firmware/BIOS screens.

The problem affects not only the guest VM (Windows) but the VirtualBox manager UI even when no VMs are running.

This problem does not occur when using an external non-touchscreen monitor.