Dock auto-hides when a right click context menu is opened while a window is under the dock

Bug #1967121 reported by Paligi
260
This bug affects 40 people
Affects Status Importance Assigned to Milestone
Dash to dock
Fix Released
Unknown
ubuntu-dock
Unknown
Unknown
gnome-shell-extension-ubuntu-dock (Ubuntu)
Fix Released
Medium
Daniel van Vugt
Jammy
Fix Released
Medium
Marco Trevisan (Treviño)

Bug Description

[Impact]

If the dock is set to auto-hide and a window is under the dock, then the dock hides prematurely when a menu is opened from one of its icons. This only seems to happen with GNOME 42.

[Test Plan]

1. Set the dock to auto hide.
2. Move a window under the dock's position so that it wants to auto-hide.
3. Open the dock and right click on one of the icons to open a menu.

Expected: Dock stays open while the menu is open.
Observed: Dock closes while the menu is open.

[Where problems could occur]

This fix may affect any scenarios relating to the dock auto-hiding.

[Other Info]

Upstream fixes:
ubuntu-dock: https://github.com/micheleg/dash-to-dock/pull/1739
dash-to-dock: https://github.com/micheleg/dash-to-dock/pull/1751

Paligi (paligi)
tags: added: jammy
Paligi (paligi)
summary: - glitch on windows miniatures when auto-hide is enabled
+ Glitch on multiple windows selector when auto-hide is enabled
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Glitch on multiple windows selector when auto-hide is enabled

Sounds like bug 1832958 (https://github.com/micheleg/dash-to-dock/issues/963) but I'm not sure because that one is difficult to understand.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: New → Confirmed
Revision history for this message
Johon Doee (jodoee11) wrote :

Super annoying bug, and a regression as this didn't happen with Ubuntu 21.10.

The problem also happens if you set the dock to auto-hide, open the dock, and right-click one of the favorites that are placed in the dock. As soon as the right-click menu opens the dock auto-hides. Sometimes the menu jumps to the very left of the screen, sometimes it just stays there but in both cases it's wrong behavior.

Please fix that. Thanks.

Revision history for this message
Paligi (paligi) wrote :

Indeed. I hadn't tested auto-hide + right click popup yet. But it is glitching as well.

I have updated the title of the issue.

summary: - Glitch on multiple windows selector when auto-hide is enabled
+ Contextual menus are glitching when auto-hide is enabled (right click +
+ windows selector)
Revision history for this message
Mehite (mehite83) wrote (last edit ): Re: Contextual menus are glitching when auto-hide is enabled (right click + windows selector)

Same bug here. Testing the LTS beta and right clicking on application icons opens a glitching contextual menu when auto-hide is enabled.
This is a regression from 21.10 which makes the use of the auto-hide feature feeling buggy and unpolished. I would be in favor of increasing the importance of this bug considering this will affect an LTS release.

Revision history for this message
Timmy Braun (timbze) wrote (last edit ):

I think this bug should be high priority, here's why:
1. Right click an icon in the dock while that app is running
2. Try to click Quit
3. As you click, the menu jumps down and it actually clicks the menu item above it. In my case "Remove from favorites"
4. Now I have to try to "Add to favorites" again without clicking the menu item above it, very challenging!

BTW my dock is on the bottom of the screen

Revision history for this message
Prringa (prringa) wrote (last edit ):

I agree, the bug is super annoying.

Basically closing windows by right clicking the icon on the dock is impossible if the dock is set to auto-hide and positioned at the bottom, because the menu jumps down, thus always chosing a wrong menu item.

The only temporary fix is setting the dock to the left side, as the menu just snaps more to the left, but you can atleast still chose the correct menu item ...

Please change it to a higher priority, using the dock menu at the bottom with auto-hide is not possible this way!

Revision history for this message
Rajarshi Ghosh Dastidar (rajarshi07) wrote :

Facing this bug on the final release of 22.04LTS as of 25-April-2022 as well. I am loving this release as a whole but this is an extremely annoying issue that ruins the overall experience. This issue makes it hard to use and the only way to use it is to set it at left or right side so that the movement of the menu doesn't affect the click position.

Suggested fix: keep the dock visible while the menu is opened.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
importance: Low → Undecided
tags: added: regression-release rls-jj-incoming
Revision history for this message
Peter Kristiawan (peterkristiawan) wrote :

I got the same bug here. I did a fresh install of Ubuntu 22.04 LTS.
Every time I right click on the application icon on the dock and suddenly the contextual menu shifts to follow the dock when the auto-hide function is activated.
This is very annoying, especially when we want to click to select the "Quit" menu, and the result is the "Remove from Favorites" menu instead.

summary: - Contextual menus are glitching when auto-hide is enabled (right click +
- windows selector)
+ Dock auto-hides while right click context menus are open
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
importance: Undecided → High
summary: - Dock auto-hides while right click context menus are open
+ Dock auto-hides when a right click context menu is opened while a window
+ is under the dock
Revision history for this message
Miguel Máiquez (miguel1970) wrote :

Same problem here, with dock set to auto-hide and positioned centered at the bottom.

tags: removed: rls-jj-incoming
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Given the specific circumstances required to hit this bug I think it's now just medium, not high.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
importance: High → Medium
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu Jammy):
importance: Undecided → Medium
status: New → Triaged
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Timmy Braun (timbze) wrote :

Specific circumstances? I guess, but once you enable auto-hide and dock at the bottom it feels like it affects everything you try to do. Even clicking the preview sometimes makes the preview jump to the other screen.

Revision history for this message
Miguel Máiquez (miguel1970) wrote :

Pinning an app to the dock (or removing it), displaying its details, open it in a new window (for browsers, for example), and other functions normally available with the right click, are all tasks very hard to complete right now when the dock is set to auto-hide at the bottom (like trying to hit a target on a video game). They might be specific, but also very basic circumstances. I just experienced it right now. I was trying to open a new window of my browser via right click on the app in the dock, but the menu shifted, or moved down, when clicked, and I ended up exiting the browser.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

We are aware this is the most popular desktop bug being reported in 22.04. It's already been assigned to the ubuntu-dock author.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
assignee: Marco Trevisan (Treviño) (3v1n0) → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The point at which the dock hides unexpectedly actually looks kind of reasonable:

_animateOut@/<email address hidden>/docking.js:764:17
_hide@/<email address hidden>/docking.js:730:18
_hoverChanged@/<email address hidden>/docking.js:694:26
pushModal@resource:///org/gnome/shell/ui/main.js:565:29
_onMenuOpenState@resource:///org/gnome/shell/ui/popupMenu.js:1344:31
_emit@resource:///org/gnome/gjs/modules/core/_signals.js:114:47
open@resource:///org/gnome/shell/ui/popupMenu.js:923:14
popup@/<email address hidden>/appIcons.js:960:14
popupMenu@/<email address hidden>/appIcons.js:425:20
vfunc_button_press_event@resource:///org/gnome/shell/ui/appDisplay.js:3149:18

I guess this is probably related to the new grabs logic introduced in gnome-shell 42. That part in gnome-shell seems fine. The mistake I think is in ubuntu-dock itself for assuming notify::hover becoming false is enough reason to hide.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix proposed: https://github.com/micheleg/dash-to-dock/pull/1739

Although I do have commit rights it would be better to get it reviewed first.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

To test the fix:

  cd ~/Downloads/
  wget https://github.com/micheleg/dash-to-dock/pull/1739.patch
  cd /<email address hidden>/
  sudo patch -p1 < ~/Downloads/1739.patch

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu Jammy):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Felix T (crvn) wrote :

Thank you for the patch. This seems to fix the right click menu. However, using the window switcher from left click is still broken because the dock auto-hides in that state, causing the same issue.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I don't quite follow comment #18 and can't find such a bug. Are you sure it's the same as this one? How do you reproduce it?

Revision history for this message
Felix T (crvn) wrote :

Apologies for the bad description. I'm talking about a situation with multiple open windows of the same application. When I left click the application to show the window previews, the same behavior as described in this ticket occurs on about half the attempts to select a window. I attached a screen recording.

More context: The recording was made with a multi monitor setup. In a single monitor setup, I cannot reproduce this behavior on the same machine right now.

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

I see. That would be with:

gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'previews'

Indeed that's a different menu type with different code and needs a different fix :S

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Comment #20 fixed.

Changed in dash-to-dock:
status: Unknown → New
Revision history for this message
Timmy Braun (timbze) wrote :

I applied the patch now and it seems to work great so far! Will let you know if I find any issues. Thank you Daniel!

Revision history for this message
Peter Parker (mrparker) wrote :

same here, patch is working fine!

install like in #17 described

Changed in dash-to-dock:
status: New → Unknown
Changed in dash-to-dock:
status: Unknown → New
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: In Progress → Fix Committed
milestone: none → ubuntu-22.10
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu Jammy):
milestone: none → jammy-updates
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
tags: added: kinetic
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

^ Fix for kinetic ^

description: updated
Revision history for this message
Dana Yatsuta (yatsuta) wrote :

Minor problem I have with the fix: dock is not supposed to be hidden when there are no windows overlapping with it; however it will hide anyway if you right click an icon and then click elsewhere to close the context menu. It will keep hiding until you have some window overlap with dock area, then its behavior resets to normal.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Unfortunately both fixes for this issue have been merged upstream already so the issue in comment #29 will need to be tracked in a new bug.

Changed in dash-to-dock:
status: New → Fix Released
Revision history for this message
Paligi (paligi) wrote :

The fix looks awesome. Thanks Daniel.

Out of curiosity, I was wondering about why this issue is still in triagged on the jammy-updates milestone. Does it require approval from an external peer now that the 22.04 is out? I am asking this as I am trying to learn about release cycles of packages in the Ubuntu ecosystem.

Also is there some sort of CI where we can see the built package from launchpad?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fixes need to always land in the _next_ Ubuntu release first: 22.10 (kinetic)

That fix is awaiting sponsorship here:
http://reqorts.qa.ubuntu.com/reports/sponsoring/

When a sponsor starts working on it you will see the packages appear (even pre-release) at:
https://launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock

Revision history for this message
Paligi (paligi) wrote :

Nice, now I get it.
Thanks a lot for the detailed explanations!

Revision history for this message
Aravind Datla (aravind045) wrote :

Hi, I tried to validate the patch, the issue still persists if I try to right click any app on the dock while an application is full window mode, attached the video, let me know if I am missing something.

In the video you can see my chrome window is in full screen mode and I open the dock by hovering the mouse pointer to the bottom of the screen as my dock is set to auto hide, when I make a right click on any of the items in the dock, the dock immediately hides making it impossible to select any item in the right click menu.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Did you log in again after applying the patch?

Revision history for this message
Aravind Datla (aravind045) wrote :

Daniel, Thank you for the fix, it does work, I failed to install the new patch to the proper location.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I have uploaded the version to Ubuntu 22.10 and unsubscribed ubuntu-sponsors. Feel free to resubscribe ubuntu-sponsors if you have something ready for sponsoring for Ubuntu 22.04 LTS.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell-extension-ubuntu-dock - 72~ubuntu6

---------------
gnome-shell-extension-ubuntu-dock (72~ubuntu6) kinetic; urgency=medium

  * Ignore loss of the hover state while a menu is open (LP: #1967121)

 -- Daniel van Vugt <email address hidden> Thu, 26 May 2022 16:35:29 +0800

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: Fix Committed → Fix Released
Jeremy Bícha (jbicha)
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu Jammy):
assignee: Daniel van Vugt (vanvugt) → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Paligi (paligi) wrote :

Shall we resubscribe ubuntu-sponsors for a release in 22.04?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

No, it was assigned to Marco after internal discussion in the desktop team. Marco said he had additional fixes he wanted to release to ubuntu-dock for 22.04.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Given that other fixes are not as straight forward as I thought, I've uploaded it as it is for now.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu Jammy):
status: Triaged → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Paligi, or anyone else affected,

Accepted gnome-shell-extension-ubuntu-dock into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock/72~ubuntu5.22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-jammy
Revision history for this message
Paligi (paligi) wrote :

Hello Robie,

I have tested the version 72~ubuntu5.22.04.1 from jammy-proposed and can confirm it works as expected.
I have three instances of the same app running. Both context menu and windows selector does not trigger the dock to auto-hide.

tags: added: verification-done-jammy
removed: verification-needed
tags: removed: verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell-extension-ubuntu-dock - 72~ubuntu5.22.04.1

---------------
gnome-shell-extension-ubuntu-dock (72~ubuntu5.22.04.1) jammy; urgency=medium

  [ Daniel van Vugt ]
  * Ignore loss of the hover state while a menu is open (LP: #1967121):
    - dash: Add a 'menu-opened' signal
    - appIcons: Remember to emit menu-state-changed for _previewMenu
    - docking: Ignore loss of the hover state while a menu is open

  [ Marco Trevisan (Treviño) ]
  * debian: Update references for jammy branching

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 08 Jul 2022 06:08:23 +0200

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-shell-extension-ubuntu-dock has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

Other bug subscribers

Remote bug watches

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