Bug 452911 - Kate registers a click when you release the mouse button, which can lead to accidental function use
Summary: Kate registers a click when you release the mouse button, which can lead to a...
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.12.3
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-23 14:25 UTC by jimbo
Modified: 2022-05-05 18:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jimbo 2022-04-23 14:25:24 UTC
SUMMARY
I had a tab open in Kate and I wanted to open the containing folder that the file was in, so I used right click on the tab and the tab disappeared.

What I imagine happened is that Kate registers a 'click' for both the OnPress and OnRelease functions. While I used right click to open the context menu I was already moving my mouse down to 'Open Containing Folder' and during that movement I released the right click and it activated the 'Close Document' function. This action is pretty easy to repeat and can be almost instantaneous.

I don't think that Kate should recognise an OnRelease mouse button as a click (unless you want to specify that in the options). From a new user's perspective, it seems like Kate just glitched out and removed the file for no reason. Or, maybe there should be a little delay added before OnRelease is recognised as a valid 'click'? (shouldn't be too long, maybe just half a second, just enough to prevent accidental use)


STEPS TO REPRODUCE
1. Right click a tab in Kate (keep right click held down)
2. Highlight 'Close Document' with your mouse and release right click

OBSERVED RESULT
The tab closes.

EXPECTED RESULT
Nothing should happen. The context menu should not react to releasing the right click.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-39-generic (64-bit)
Graphics Platform: X11
Comment 1 Christoph Cullmann 2022-05-05 18:04:39 UTC
Hmm, that menu behavior is nothing we actually handle.
This is done by Qt and consistent with all menus in all Qt based applications.
I can see that you might run in issues with this, but we can't alter this on our own.

If you want to have this changed, you need to report that to Qt upstream.

But I don't think this behavior change is that wanted, thought that might be just my impression.