-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add universal context menus in JupyterLab #577
Comments
Thanks for the report, @pjbull. It looks like we need to check for the HTML element that is clicked and potentially add other options. |
It could also be that clicking on an |
Maybe this should actually be widened to handle context menus in the notebook generally. For example, you don't get copy-paste options when right-clicking text in input cells either. Also, it may be nice to have Insert Cell Above/Below and Delete Cell in the context menu, but that's beyond parity. |
I think that we should sparingly use context menus by default. Maybe have context menus only on the prompt number areas? I'm not sure we need them on documents at all if we have the same options in the top-level menu bar. |
For comparison: Cloud9 has a context menu in the file browser area, but uses the browser default in the document area. |
#585 removes the context menus from documents, but we should leave this open for discussion. |
I want to revisit the question of context menus. First question: Is it possible for us to trigger the browser context menu if a certain modifier is pressed with the contextmenu event? Basically I am wondering if we can start to offer context menus where they make sense, while still offering an escape hatch for users to access the browser context menu. Second question: If that is possible, what is the best way to start implementing context menus. Should widgets/plugins do this on their own? Should we offer a centralize approach for this? |
It may be feasible to use |
and the default should be to present the browser context menu? |
I understood Brian's position to be that our menu should be the default, with the system menu being available using a modifier. |
There doesn't seem to be any traction by other browsers to implement extensible context menus last time I checked. The original post also brings up another point about copying images/arbitrary stuff to the clipboard. IIRC there are some security policies in place which make this extremely difficult/impossible to do. Something about not being able to copy to clipboard unless it's on the path of a "trusted" event. Using our own custom context menus means we're never on a trusted event path. So it may be a bit of a Catch-22. I'll need to look into it again. |
Is it viable to bring up own own or the system one based on a keyboard modifier? That gives us the best of both worlds...(or worst) |
Yeah, if we want the system context menu, we just do nothing in our |
This is implemented in master, closing. |
Current Summary
Original Comment
Steps
Result
No ability to copy image to clipboard:
The text was updated successfully, but these errors were encountered: