Horrible right click and right click menu malfunction for chromium browsers and Zorin 17

Is there any solution? If not, I am probably going to have to downgrade to Zorin 16.

Since you are using Gnome, a Gnome extension might help.

I did a search and cannot find any that apply in this way - if anyone else finds one, please post it.
In the meantime, we can try a custom script to make an extension. I am no expert in Gnome Extensions... so this is a trial.

Make the directory. Replace USER with your desktop user name (rcpr is RightClickPressRelease):

mkdir -p ~/.local/share/gnome-shell/extensions/rcpr-fix@USER

If you want this to be system-wide, you must elevate to root first,

sudo -i

Then

mkdir -p /usr/share/gnome-shell/extensions/rcpr-fix@USER

Open that directory and create a new file. Name it metadata.json
Open that file and paste in (Again, remember to change USER to your Desktop User Name):

{
    "uuid": "rcpr-fix@USER",
    "name": "Right Click Press Release Fix",
    "description": "Prevent right-click press release from triggering an action",
    "shell-version": ["43", "44"],
    "version": 1
}

Save the file.

Now create another new file and name it extension.js to make your javascript:
Open it and paste in the following:

const Main = imports.ui.main;
const Shell = imports.gi.Shell;
const Meta = imports.gi.Meta;

let handler;

function init() {}

function enable() {
    handler = global.stage.connect('captured-event', (actor, event) => {
        if (event.type() === Meta.EventType.BUTTON_RELEASE && event.get_button() === 3) {
            let target = event.get_source();
            if (target instanceof Shell.GenericContainer && target.get_parent() === Main.layoutManager.desktop) {
                return Clutter.EVENT_STOP;
            }
        }
        return Clutter.EVENT_PROPAGATE;
    });
}

function disable() {
    if (handler) {
        global.stage.disconnect(handler);
        handler = null;
    }
}

I set this as Mouse button 3 which is the usual Right Click. If yours is different, you may need to change the button number.
Save file...
Reboot or Alt+f2 then enter in r and hit the enter key... Then enable the extension in the Extension Manager used on Zorin Desktop or Gnome Tweaks and test... Fingers and toes all crossed.

I tried using the extension that I mentioned, Mouse Gesture Events but if disabling extensions on your end didn't help, it probably is something else... though I'm not sure what.

One question, are you using fractional scaling or have zoomed in on the screen somehow? Watching the video again, it seems that the context menu appears almost under the cursor while in reality it should appear with a small offset. Maybe this is getting in the way of it.

1 Like

@j_luz , @Aravisian ,
Looks like I made a breakthrough?
Thanks to @j_luz. Here is what xinput test shows for my touchpad left/right click buttons.
Untitadwdwled

But how do i fix it?

Nope, that looks good if you just clicked left and right once. If it was press 1 release 1 press 1 release 1 for the left click, that is a double.

Is your browser page zoomed in? I still can't get my context menu to show up under my cursor when I left click unless I zoom the browser in. I'm on a different browser though.

Sorry, I meant right click, my right click is just on the opposite side than yours.

1 Like

I agree - That is as it should be. Left is 1, middle is 2 and right is 3.

1 Like

@j_luz , @Aravisian, thanks for clarifying. Not easy to figure out what the terminal output means.

@j_luz , "Is your browser page zoomed in?"

No, and when I change the zoom it doesnt effect anything, although that was a good idea & worth exploring.

Also, I did xinput test without testing it in the browser, that was my results above. But just now I did xinput test and tried to click in my browser and it doesnt register with xinput test and the terminal... Not sure to get it to register. The closest that xinput test will register is when I move my mouse all the way to the bar at the top of the browser, whats called the "system title bar and borders".

Yes especially when it goes crazy if you move the mouse a little.

If you right click the mouse on a link and hold the mouse down instead of letting go, does it trigger something in the context menu?

1 Like

@j_luz , thanks that was a good idea to try. The malfunction goes completely away when I hold down the right click button and dont release, the context menu pops up, but it doesnt select anything and go haywire. So this is a temporary crude solution to the problem.

1 Like

I can't take the credit, @Aravisian put me on that path when we were brainstorming for solutions the other day. I think it might take you a while to get used to holding it down, then selecting what you want and letting go. But less annoying than rolling the dice, until a proper fix is found.

1 Like

@j_luz , "What is the op wanting to achieve when right clicking a link? I mean which option do they want? I don't suppose there is a way to remap it."

--I want to be able to have the right click context menu pop down without it double clicking on a random menu option. I want to be able to click on any option I want.

1 Like

Finally solved it the right way. Thanks to @Aravisian for mentioning what the right click problem is technically called, which is: "Prevent right-click press release from triggering an action". You describing it as succinct as that helped me do some research with that term and ubuntu, and here is how its solved and what worked perfect for me:

1) Install Easystroke Gesture Recognition from repository

sudo apt-get install easystroke

2) Open Easystroke then go to preferences tab, in Behavior section click Gesture Button

and right click on the rectangular area in Select a Mouse or Pen Button window.

3) In Timeout Profile dropdown list pick up Timeout Off

Done

3 Likes

Changing it back to unsolved again because this solution is poor and makeshift. Problem not completely solved. My last comment and solution works. But after using easystroke more, I start to understand what it does.

1.) In addition to my solution above, one needs to also check the box "Autostart easystroke", so that it will continue to work after OS restart.

2.) Whenever easystroke is used to solve the right click malfunction, it saves your mouse gestures until you release the right click button. I need to find a way to have it not save my mouse gestures or do anything else, or alternatively, solve the right click problem another way. But for right now, it does solve the problem and is NOT a big deal.
See screenshot:
image

Here is a video showing what it does, at first in the vid I right click quickly, but at the end i change and hold down the right click button:

2 Likes