New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Trigger page's right-click handler for a link #874
Comments
Hi, I just met the same problem with you. I say your comment was posted 1 year ago, is there any update on that? |
I've created a branch here which should do the trick, using the This seems like quite a low-demand feature, so I wouldn't expect to see it in the released version any time soon. |
I need this feature too. I would think this would be very much needed. Just started using vimium a few weeks ago with awesome wm. I love vimium and rarely use the touchpad now. I would use it even less if this feature was available. |
@logan85 this doesn't open the context menu unfortunately; there isn't currently any way for us to do that at the moment. The branch I opened is only to right click on pages which handle right click themselves. Ignore this if that's what you were after |
Closing this in favor of #1312. |
@philc Isn't this issue about calling the right mouse button event of a link and not about a context menu for a Vimium-Link? |
Please reopen this issue. This issue talks about triggering browser's context menu of an element in the web page, not a vimium specific one. #1312 talks about a vimium specific menu. Being able to trigger context menu allows users to access other extensions' actions which are added to the context menu of the browser making vimium much more useful. Please reopen. Waiting for your response. |
As far as I know, there is no Chrome API to do this, @RamAnvesh. |
Thanks for the response. Maybe we can reopen this issue when such an API becomes available |
jQuery does this so:
Are you sure vimium can't do something like this given javascript can? Source: http://stackoverflow.com/questions/6250447/trigger-right-click |
I suspect this cannot be done from within the Vimium context (e.g., see here. (The page you quote is for the host page's own Javascript, not an extension.) |
@smblott-github What I'm running into is not wanting to display the chrome context menu but to fire the JS context menu event to display any context menu registered in the page's javascript for that element. This does appear to be possible per this SO answer https://stackoverflow.com/a/7914742/363522 I would like to propose reopening this issue to implement a Here is a fiddle with a proof of concept https://jsfiddle.net/g8te46rn/17/ |
Sounds great, yes it does look like adding contextmenu as an event would work for that. Is there anything I can do to help make it happen? |
I was looking for this feature also, it would be very useful |
There is an extremely clear use case for this, which is that all developers inevitably will end up needing to be able to right click on an element in order to inspect it in the chrome developer tools. If right click is out of the question, would it be possible to trigger the inspect element command on a specific page element? |
No. There's no way to do this in the extension API. |
@mrmr1993 ok, thanks for confirming |
@chriszrc if this is something you would really like, for either Vimium or some other extension, you could advocate for it in the chromium issue tracker. A full write-up with a proposed API design, motivating use cases, permissions model and analysis, and an evaluation vs the alternatives is most likely to make progress. If you do decide to do this, please post a link here so that other interested people can follow/support it. |
@mrmr1993 OK, I could try to take this on, but I don't have a grasp on an ideal API design or permissions model and analysis... |
The existing APIs are probably the best place to start from the design side. Ideally the API should be pretty simple, so deciding where an For the permissions model, the
|
Link Hints mode now supports focusing a link, so at least the context menu key is usable, though. |
@innaterebel hi, what are you using to enable a keyboard shortcut to get the context menu to show up? Shortcat? Karabiner? |
Seems like this is impossible for now. Can't "play with mpv using right click". Had to open the video page & then trigger "play-with-mpv" shortcut. |
Hey everyone 👋. I made Homerow, a macOS app inspired by Vimium but for the whole OS. You can right-click and Command-Click (to open link in new tab) on buttons and links. You can find Homerow at https://homerow.app. right-click.mp4 |
why not press the menu key on the keyboard (all windows keyboards usually have menu key) then use built-in browser shortcut to select option? i.e. |
Visually select the item of page, then press |
I have to use a web-based management tool a lot in Chrome. Vimium makes it easier to avoid removing my hands from the keyboard. One thing I would love to see is the ability to right-click on a link, rather than just following a link (with f or F). The tool we use uses right-clicking extensively on their site. For example, if I click a client in my home screen, it opens the client details. However, what I usually want to do is right-click the link, and choose "add time", or "add ticket note" etc from the resulting drop-down menu. If Vimium provided a modifier key to make f or F a right click, I could then use the arrow keys to select from the resulting drop-down menu.
The text was updated successfully, but these errors were encountered: