Skip to content
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

feat(widget): Suppress right-click event propagation #160

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

manzt
Copy link
Member

@manzt manzt commented Jan 23, 2025

JupyterLab captures right-click ("contextmenu") events globally, causing
conflicts with HiGlass's custom context menus when interacting with
anywidget.

This update introduces an addEventListenersTo function that prevents
"contextmenu" events from propagating beyond the widget bounds.
Additional event types can be easily added to this function in the
future if needed.

Screen.Recording.2025-01-22.at.18.55.58.mov

Checklist

  • Unit tests added or updated
  • Documentation added or updated
  • Updated CHANGELOG.md

JupyterLab captures right-click ("contextmenu") events globally, causing
conflicts with HiGlass's custom context menus when interacting with
anywidget.

This update introduces an `addEventListenersTo` function that prevents
"contextmenu" events from propagating beyond the widget bounds.
Additional event types can be easily added to this function in the
future if needed.
@manzt manzt merged commit 48e25b6 into main Jan 23, 2025
6 checks passed
@manzt manzt deleted the manzt/stop-propagation branch January 23, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants