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

Feature proposal #57

Open
dtex opened this issue Mar 10, 2024 · 0 comments
Open

Feature proposal #57

dtex opened this issue Mar 10, 2024 · 0 comments

Comments

@dtex
Copy link

dtex commented Mar 10, 2024

Would you be amenable to a PR that allows the user to specify the initial event type in the options?

This, for example, would change the initial click even to a left/standard click:

new VanillaContextMenu({
  scope: document.querySelector('edit'),
  eventType: "click", // Optional. Defaults to "contextMenu"
  menuItems: [ ... ],
});

I initially balked at the designer's request since contextual menus have an expected trigger (found in Apple's HIGs, Windows design controls, etc), but with the change, this library works great for recreating this example (found in Google Chat).

Screen.Recording.2024-03-10.at.1.20.47.PM.mov
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

No branches or pull requests

1 participant