Right-click should not pre-light first option, too easy to accidentally select the first Context-menu option.

Bug #410636 reported by Griever on 2009-08-08
114
This bug affects 19 people
Affects Status Importance Assigned to Milestone
GTK+
Expired
Low
gtk+2.0 (Ubuntu)
Wishlist
Unassigned

Bug Description

When I right click in nautilus, the context menu appear. If I right click on a menu item, the function of that menu item is performed. This is very annoying, because when the context menu appears, the mouse is at the first menu item, so if you accidentally right click two times, you will surely perform the function of the first menu item! Everytime I right click in desktop, i probably create a new Folder!

I think there maybe 2 solutions to this:
- To perform the function of a menu item, only left click is allowed.
- When the user right click, the context menu will appear at a bit lower position, so the mouse will not be at the first menu item.

Vish (vish) on 2009-08-09
Changed in hundredpapercuts:
assignee: nobody → Marcus Carlson (0-launchpad-mejlamej-nu)
status: New → Confirmed
Vish (vish) wrote :

This is due to> "The default menu positioning function will position the menu at the current mouse cursor position. " > http://library.gnome.org/devel/gtk/unstable/GtkMenu.html#gtk-menu-popup

This doesn not happen in firefox , which fixes this issue by opening the menu a few pixels below or above the pointer, so no option is selected.

The fix needs to be in nautilus alone...

It seems this behavior worked in nautilus pre 2002 but was changed to be more in line with other gtk applications [1]. So the right place to fix this is gtk.

I'll file a bug against GTK.

http://git.gnome.org/cgit/eel/commit/?id=5ee31ee96f0b3027808026fb62a06c4593d43583

I'm no gtk hacker...sorry.

Changed in hundredpapercuts:
assignee: Marcus Carlson (0-launchpad-mejlamej-nu) → nobody
Vish (vish) wrote :

Yeah... Fixing it in gtk should solve this all , rather than patching every app.

Some other apps ,i found this behavior to be problematic>
Gnome-panel[not applets]
Gnome-menu[right-clicks on Applications menu]

Vish (vish) on 2009-08-10
summary: - right click on Nautilus is confusing
+ Right-click should not pre-light first option, too easy to accidentally
+ select the first Context-menu option.
Changed in gtk+2.0 (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Changed in gtk:
status: Unknown → New
Vish (vish) on 2009-08-13
Changed in hundredpapercuts:
importance: Undecided → Low
status: Confirmed → Triaged
Changed in gtk+2.0 (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
Vish (vish) on 2010-06-11
Changed in hundredpapercuts:
milestone: none → maverick-round-7-notifications+gtk
Changed in hundredpapercuts:
assignee: nobody → Alberto Milone (albertomilone)
status: Triaged → In Progress
Alberto Milone (albertomilone) wrote :

I've provided a patch in the upstream bug report.

Here's a PPA with my patched gtk+ for both Lucid and Maverick, if you want to test it:
https://launchpad.net/~albertomilone/+archive/papercuts

Vish (vish) wrote :

@Alberto Milone : Tested it on Lucid and works great! thanks.

Changed in hundredpapercuts:
status: In Progress → Confirmed
Changed in hundredpapercuts:
status: Confirmed → In Progress
Changed in gtk:
importance: Unknown → Low
Vish (vish) on 2010-11-23
Changed in hundredpapercuts:
milestone: maverick-round-7-notifications+gtk → nt7-potpourri
Savvas Radevic (medigeek) wrote :

Can we apply Alberto's suggested patch from upstream to ubuntu natty, until it is applied upstream?

Sebastien Bacher (seb128) wrote :

It doesn't seem something to do since upstream had concerns about the patch

Changed in gtk+2.0 (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody

I had similar symptoms to the ones mentioned above. A single click worked like two very quick single clicks (and not a double click). This was of course not showing up on my other Linux Laptop or when used with any other OS.

In the end it turned out to be because of having both an external USB mouse and my laptop touchpad enabled simultaneously. When I used my laptop's "Fn+Disable Touchpad" key to disable touchpad, the issue goes away and i can use the USB mouse ok. I wonder if some of you folks were facing the same issue.

naught101 (naught101) wrote :

This does occur in firefox, but only when the context menu is too big to be lowered.

Changed in gtk:
status: New → Confirmed
Changed in hundredpapercuts:
milestone: nt7-potpourri → precise-9-miscellaneous

What's the progress on this fix?

Changed in hundredpapercuts:
milestone: precise-9-miscellaneous → raring-gtk

Moving menu some pixels away does not fix an issue. Like Aditya Sharma mentioned right-click and release act as 2 clicks.
And I can confirm that if you keep moving mouse to the right while right-click+release then you get menu entry selected at a 100% rate.
I use Eclipse and when right-clicking on project in project explorer I many times get "open new window" auto selected. I do right-click+release then menu appears some ms after then menu disappears and new window opens, I even don't get highlighted menu entry to show.
My vision of fixing this issue is to disable second click event on release if some defined very short delay not reached.

This issue seems USB related too, con not reproduce with touchpad.

Changed in hundredpapercuts:
assignee: Alberto Milone (albertomilone) → nobody
Changed in hundredpapercuts:
milestone: raring-gtk → papercuts-s-gtk

Guys, try to clean right mouse button switch or solder new one or change mouse to brand new from package and try to reproduce =)

Anton Veretenenko (anton.veretenenko): You can buy me a new laptop every time my internal right button on my computer needs to be switched!

Patrik Nilsson (nipn): laptops has switches too, old rusty switches, which can be replaced =) If it's not touchpad gesture.
Actually I can reproduce it easily with Eclipse with new mouse. In project list, move mouse over project name and hold and release right button while moving mouse to the right fast (just a little shake of a hand is enough with sensitive mouse) and you get menu highlighted and auto selected fast. Not sure if it's gtk releated though.

Wenqiang Wang (wenqiang-w) wrote :

I met with the same problem on my Ubuntu 13.04 laptop. I'd like to post a partial/possible solution here in case that someone want to try.

Here is the problem.
    Inside Google Chrome, sometimes when you right click (for only once) on a web page, it will behave like you double right clicked and as a result it navigate back. (`Back` is the first menu item on the context menu).

When does the problem occur.
    It happens that the problem does not occur with Ubuntu 13.04's built-in themes: Ambiance, Highconstrast, Radiance. When I installed and activated third-party themes like Uncomplicated, Flatsutdio, Mediterraneanlight, etc the problem does occur.

The possible cause of the problem.
    https://bugzilla.gnome.org/show_bug.cgi?id=591258

The solution.
    After hours search and research, I found why the built-in themes won't be affected. In these themes, a little padding is added to the top of menus. When you right click on the padding, it won't activate the first menu item. That's it. So we can add that to other theme by simply adding (or modifying) GtkMenu ::vertical-padding = 3 to <PathOfTheTheme>/gtk-2.0/gtkrc, under `style "default"` section. You could refer to /usr/share/themes/Ambiance/gtk-2.0/gtkrc.

Hope it helps.

Adolfo Jayme (fitojb) on 2014-03-06
no longer affects: hundredpapercuts
Changed in gtk:
status: Confirmed → Fix Released
Changed in gtk:
status: Fix Released → Confirmed
Changed in gtk:
status: Confirmed → Expired
Badtz Maru (marubadtz) wrote :
Download full text (3.6 KiB)

I am just confirming this problem exists also on Xubuntu 18.04 and Firefox with the latest software updates as of to this date.

At some point the Linux OS looses the reference point of the pop-up menu with respect to the right mouse click courser position, and it becomes permanently offsetted by a fixed amount of X and Y pixels.
The mouse courser is offsetted by such amount of pixels and direction that it lands right on top of the pop-up menu first upper option, and upon releasing the mouse button it executes whatever operation appears in that menu position, see attached picture.

In my case this anomaly appeared at some point on my newly installed Xubuntu 18.04 and inside the Firefox window web page.
Xubuntu 18.04 came with Firefox 59 and at some point, probably after it run a software update (can't remember exact at what point the problem started) it had installed Firefox 60 when I noticed the problem within the browser.
I had some problem with my Xubuntu install and reinstalled it again where it also would reinstall also the older Firefox version 59, the right-click offset was again gone, ran the software update and Firefox 60 got installed, the offset problem was back again.
Today Firefox 61 update came and after the update the offset still persists.

In the case of Firefox the following scenarios can occur:
1. Right click on web link will automatically open it up in a new tab, although the user might want to sellect another option from the menu.
2. Right click on an empty space inside a web page, would, if a previous web page have been opened, bring the user back to that page, although the user might want to sellect another option from the menu.

---

After searching around on the net on this anomaly I came across the following web link below and in particular post #8, solved the offest problem temporary.
"Mouse offset problem when using citrix"
https://ubuntuforums.org/showthread.php?t=1214418&s=7a523455906cfff23926291a1a0b0775&p=10057080#post10057080

TEMPORARY SOLLUTION: What I did was to drag Firefox window in the corners so as to manually expand its window size to the maximum available desktop size, I then grabbed the window in the upper frame and "bounced" up to get the full window size (although I already had it at maximum window size), then dragged it back so as to "leave" full size, tried right clicking and the offset was gone.
CAVEAT: Restarting Xubuntu will revert the mouse courser-menu offest, but by repeating the above mentioned procedure resolves the problem and seems to hold throughout the session until next restart.

---

If possible, I would suggest the developers to introduce a quick fix that would at least prevent a right-click operation from performing a doubble operation, that is, separate the operation for right-click to bring up the pop-up menu from also executing any of the menu operations with a single right click, perhaps adding an opt-in/out right-click behavior option.

Below some web links that might be relevant to the issue:
https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/410636
https://support.mozilla.org/en-US/questions/1210704
https://askubuntu.com/questions/18969/how-to-show-context-menu-when-ri...

Read more...

Badtz Maru (marubadtz) wrote :

I just discovered that the temporary solution as described in previous post #20 seem to hold only for the current browser window which has been once expanded and bounced up in order to correct the offset, however, opening a new window or right click on a link and selecting "Open link in New Window" will bring the offset anomaly back but only for those new windows opened up, same for when opening up a "New Private Window".

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.