Skip to content

fix: improve context menu prevention logic #609

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

Merged
merged 1 commit into from
May 13, 2025
Merged

fix: improve context menu prevention logic #609

merged 1 commit into from
May 13, 2025

Conversation

keshavbhatt
Copy link
Member

@keshavbhatt keshavbhatt commented May 9, 2025

Refs: CO-2083

What was changed:

  • Updated the context menu event listener to traverse event.composedPath() and check for allowed elements anywhere in the event path, enabling proper behavior even when right-clicking inside Shadow DOM elements.
  • Documented expected behavior with tests

update the listener to traverse `event.composedPath()`
and check for allowed checks anywhere in the hierarchy
@keshavbhatt keshavbhatt changed the title fix: improve context menu prevention logic for specific elements fix: improve context menu prevention logic May 9, 2025
@CLAassistant
Copy link

CLAassistant commented May 9, 2025

CLA assistant check
All committers have signed the CLA.

@keshavbhatt keshavbhatt marked this pull request as ready for review May 9, 2025 16:00
@keshavbhatt keshavbhatt merged commit a6c9c48 into devel May 13, 2025
4 checks passed
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.

5 participants