I have a new XPS 13 9670 with Ubuntu 18.04.
A bunch of applications often (but not always) think I'm dragging. For example, when using GNote and my house hovers over my list of notes, it will attempt to drag it.
I have this with a number of applications. The Telegram desktop application too, but oddly enough not every application. Could this be a hardware problem, or is it something I can fix in software?
I had the same issue in multiple applications including Okular, Eagle etc. I accidentally discovered that it might be related to the touchscreen. While in the 'dragging mode' in Okular, I could get out by simply tapping on the touchscreen once. I then experimented by explicitly touching the screen (and not taking my finger off) and immediately, the pointer started dragging. I suspect one possible cause for the behavior is spurious touch detects without the corresponding release being detected.
I had the same issue on an inspiron 2-in-1: after using my pen, it kept dragging on click until rebooting. I'd also been looking at other desktop environments/window managers and switching to Awesome WM solved the problem. So for me it seems to be something specific to Gnome.
Edit: Actually, it recurred again. However, restarting the device did work. So now I have in my bashrc an alias like this:
Of course, if you want to do this, replace the name with whatever your device is called. Then I just run penfix when it gets messed up and it fixes it.
My memories about are not so fresh any more, but on 16.04 I had this; only while using the vector-graphics app Inkscape.
There was a specific task or procedure in Inkscape (I don't remember what) which triggered this state, and I could even reproduce this problem quite reliably.
Surprisingly, it had to do something with the presence of an external USB keyboard (this all happened on a laptop). So as far as I remember, the solution was to unplug the USB keyboard, wait a little, then re-plug.