Teoman shipahi
Teoman shipahi

Reputation: 23052

Chrome Extension Trigger Context Menu

Is there any way to trigger context menu in chrome extension?

What I want to do is; if user make a selection on text I would like to trigger context menu automatically. How can I do that?

Upvotes: 0

Views: 444

Answers (1)

Igor Jerosimić
Igor Jerosimić

Reputation: 13741

There is no way to trigger context menu and there probably never will be. Context menus are modal, they take away control from users and thus could be used to spam/annoy users.

I'm guessing you need to show some commands in context menu for selected text, so I would try to create a context menu in HTML and send commands via content script instead of using contextMenus API.

Upvotes: 1

Related Questions