You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hijack the browser's right-click contextual menu when right-clicking on any part of the items in the FSE / Gutenberg post's blocks hierarchy list view sidebar #40287
With the list view sidebar activated on the left side of the Gutenberg editor, whether for posts/pages or for the FSE, I'm always annoyed when I right-click those items in the list and end up with my browser's (Firefox's) contextual right-click menu full of options irrelevant to my intended action regarding that interactive non-content widget (the list view), which was to get the item-specific actions that Gutenberg offers in its "three dots" menu for that item.
Currently I have the intuitive habit of right-clicking the items anywhere, getting the useless browser menu, having to left-click to dismiss it, then having to left-click the three dots to get the correct menu. I shouldn't have to aim for the tiny three-dots menubutton to get that menu, I should be able to right-click anywhere on that item's row. Fitt's law, etc., for a more efficient and native-feeling/integrated application UX.
What is your proposed solution?
Please hijack the browser's right-click event to show the three-dots contextual menu of Gutenberg actions when clicking on a block item, particularly in the list view sidebar. If Google Drive and GMail can do it, so can WordPress.
Comparison of the current¹ vs suggested behavior when right-clicking anywhere on a row/item in the list view:
¹: Tested with the stable versions bundled with WordPress 5.9.3 and the TwentyTwentyTwo theme, on Firefox 99 on Linux.
I thought I might have a go at implementing this. I know right-click override behaviour can be a bit contentious for some folks, so in #41041 I've explored implementing this feature plus an editor settings (defaulting to true) so that folks can opt-out of right click overrides if they want to.
Activity
andrewserong commentedon May 13, 2022
I thought I might have a go at implementing this. I know right-click override behaviour can be a bit contentious for some folks, so in #41041 I've explored implementing this feature plus an editor settings (defaulting to
true) so that folks can opt-out of right click overrides if they want to.andrewserong commentedon Sep 14, 2023
A new(er) attempt at implementing this is ready for testing over in #50273.
BenceSzalai commentedon Dec 9, 2024
Is there a reason this was not added to the main editor canvas, just the List View?