Summary: | Pressing 'Shift' to change 'Move to trash' to 'delete' does not work when a sub-context-menu is open | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Derek Christ <christ.derek> |
Component: | Folder | Assignee: | Eike Hein <hein> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | bugseforuns, elvis.angelaccio, nate, plasma-bugs |
Priority: | NOR | ||
Version: | 5.19.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-desktop/commit/1b9b49b9fa823246c1880232e063c97fd7a916eb | Version Fixed In: | 5.22.4 |
Sentry Crash Report: | |||
Attachments: | Expected result |
Can reproduce. Thanks for the nice clear bug report. A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/79 Git commit 9e4642d435085f27134ed6c8431734dcacf65834 by Elvis Angelaccio, on behalf of Derek Christ. Committed on 23/11/2020 at 22:07. Pushed by elvisangelaccio into branch 'master'. Fix delete action switching via 'Shift' when sub-context-menu is open Switching the 'Move to Trash' action to 'Delete' using the shift key does not work when the mouse hovers a submenu. This fix resolves the issue by using an event filter instead of the key event functions. M +19 -8 src/dolphincontextmenu.cpp M +2 -2 src/dolphincontextmenu.h https://invent.kde.org/system/dolphin/commit/9e4642d435085f27134ed6c8431734dcacf65834 Git commit 13a508bcabb1185adb05e30c70a00bacfa74f10a by Méven Car. Committed on 04/12/2020 at 16:19. Pushed by meven into branch 'master'. Linking fileitemplugin: use parent Widget as menu parent It is to allow the parent to add EventFilter to its children. M +1 -1 activities/fileitemplugin/FileItemLinkingPlugin.cpp https://invent.kde.org/network/kio-extras/commit/13a508bcabb1185adb05e30c70a00bacfa74f10a Git commit 26c790b360a41695de210cbf12117b2402ca7326 by Méven Car. Committed on 05/12/2020 at 06:48. Pushed by meven into branch 'master'. Tagging fileitemplugin: use parent Widget as menu parent It is to allow the parent to add EventFilter to its children. M +2 -1 src/tagsfileitemactionplugin/tagsfileitemaction.cpp https://invent.kde.org/libraries/baloo-widgets/commit/26c790b360a41695de210cbf12117b2402ca7326 Git commit b0fb8fd1ab9f39a7dfc9f10cbb7f945e60022bd3 by Méven Car. Committed on 05/12/2020 at 17:11. Pushed by meven into branch 'master'. Share fileitemplugin: use parent Widget as menu parent It is to allow the parent to add EventFilter to its children. M +1 -2 src/fileitemactionplugin/sharefileitemaction.cpp https://invent.kde.org/frameworks/purpose/commit/b0fb8fd1ab9f39a7dfc9f10cbb7f945e60022bd3 Git commit ce3c2435250f5eb8a3c9322359b25c46d2b6fb96 by Elvis Angelaccio, on behalf of Méven Car. Committed on 07/12/2020 at 22:13. Pushed by elvisangelaccio into branch 'master'. ContextMenu: Allow plugins submenus to react to Shift modifiers In 9e4642d435085f27134ed6c8431734dcacf65834 support was added for the NewFileMenu. This adds support for the Plugins submenu provided they relay their parentWidget to their own menus. M +1 -1 src/dolphincontextmenu.cpp https://invent.kde.org/system/dolphin/commit/ce3c2435250f5eb8a3c9322359b25c46d2b6fb96 Git commit f8d1b494db19904679101139eb81a5715061aa11 by Elvis Angelaccio. Committed on 02/01/2021 at 18:22. Pushed by elvisangelaccio into branch 'master'. Revert "ContextMenu: Allow plugins submenus to react to Shift modifiers" This reverts commit ce3c2435250f5eb8a3c9322359b25c46d2b6fb96. The apidox of setParentWidget says: Set the parent widget for any dialogs being shown. This should normally be your mainwindow, not a popup menu, so that it still exists even after the popup is closed (e.g. error message from KRun) and so that QAction::setStatusTip can find a statusbar, too. M +1 -1 src/dolphincontextmenu.cpp https://invent.kde.org/system/dolphin/commit/f8d1b494db19904679101139eb81a5715061aa11 Re-opening after revering the latest commit. We need to find another solution. A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/225 A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/510 Git commit dc3beae3ab2c55cd3501e17f93b51e93e876a177 by Méven Car, on behalf of Derek Christ. Committed on 22/06/2021 at 08:53. Pushed by felixernst into branch 'release/21.04'. Fix shift-action modifier in context menu Before this patch, the shift-action modifier in context menus did not work when a sub-context menu is open, that does not have the main context menu as its parent. The new fix installs an event filter on QApplication whenever a new context menu is opened to make the context menu aware of shift-presses even when a sub-context menu is in focus. FIXED-IN: 21.04 M +8 -13 src/dolphincontextmenu.cpp M +1 -2 src/dolphincontextmenu.h https://invent.kde.org/system/dolphin/commit/dc3beae3ab2c55cd3501e17f93b51e93e876a177 Git commit 48ecda47defb671b654ee9633b2a8e623699e7d5 by Nate Graham, on behalf of Derek Christ. Committed on 18/07/2021 at 20:17. Pushed by ngraham into branch 'Plasma/5.22'. Fix shift-action modifier in context menu Before this patch, the shift-action modifier in context menus did not work when a sub-context menu is open, that does not have the main context menu as its parent. The new fix installs an event filter on QApplication whenever a new context menu is opened to make the context menu aware of shift-presses even when a sub-context menu is in focus. FIXED-IN: 5.22 M +1 -0 containments/desktop/plugins/folder/foldermodel.cpp https://invent.kde.org/plasma/plasma-desktop/commit/48ecda47defb671b654ee9633b2a8e623699e7d5 Git commit 1b9b49b9fa823246c1880232e063c97fd7a916eb by Nate Graham, on behalf of Derek Christ. Committed on 18/07/2021 at 20:25. Pushed by ngraham into branch 'master'. Fix shift-action modifier in context menu Before this patch, the shift-action modifier in context menus did not work when a sub-context menu is open, that does not have the main context menu as its parent. The new fix installs an event filter on QApplication whenever a new context menu is opened to make the context menu aware of shift-presses even when a sub-context menu is in focus. FIXED-IN: 5.22 (cherry picked from commit 48ecda47defb671b654ee9633b2a8e623699e7d5) M +1 -0 containments/desktop/plugins/folder/foldermodel.cpp https://invent.kde.org/plasma/plasma-desktop/commit/1b9b49b9fa823246c1880232e063c97fd7a916eb A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1633 Git commit 3f4b4bc60fe2bce4d2b6ba81e2d4e341d8092b1a by Felix Ernst, on behalf of Felix Ernst. Committed on 23/05/2024 at 11:12. Pushed by felixernst into branch 'master'. KAbstractFileItemActionPlugin: Remove wrong sentence in documentation The removed line says to have the KAbstractFileItemActionPlugin as the parent of the returned actions. Contrarily, a few lines further down the documentation says to have the parentWidget as the parent of the returned actions. The latter is the more recent addition to the documentation which was added because the former did not work out in some contexts. The bug mentioned below contains a list of changes that made the parentWidget the parent of actions from KAbstractFileItemActionPlugins, which seems to have worked out because from what I can tell they were not reverted in the years since then. M +0 -3 src/widgets/kabstractfileitemactionplugin.h https://invent.kde.org/frameworks/kio/-/commit/3f4b4bc60fe2bce4d2b6ba81e2d4e341d8092b1a |
Created attachment 131296 [details] Expected result SUMMARY Pressing 'Shift' to change 'Move to trash' to 'delete' does not work when the mouse is hovering over an element which opens a sub-menu in the context menu. This is slowing down workflow because this happens often accidentally. STEPS TO REPRODUCE 1. Right click on a file 2. Press shift to observe that 'Move to trash' changes to 'Delete' 3. Hover an element in the context menu that opens a sub-menu 4. Press shift again and observe that it will not change any more OBSERVED RESULT 'Move to trash' stays EXPECTED RESULT 'Move to trash' changes to 'Delete' Operating System: Arch Linux KDE Plasma Version: 5.19.4 KDE Frameworks Version: 5.73.0 Qt Version: 5.15.0 Kernel Version: 5.8.5-arch1-1 OS Type: 64-bit Processors: 4 × Intel® Core™ i5-3570K CPU @ 3.40GHz Memory: 15.6 GiB of RAM Graphics Processor: Radeon RX Vega