javascript - Safari extension – context menu item renders TWICE - Stack Overflow

I render three new context menu items through a Safari extension like this:browser.contextMenus.create

I render three new context menu items through a Safari extension like this:

browser.contextMenus.create({
  id: 'copy-this',
  title: 'Copy this',
  contexts: ['selection', 'link']
});

browser.contextMenus.create({
  id: 'copy-that',
  title: 'Copy that',
  contexts: ['selection', 'link']
});

browser.contextMenus.create({
  id: 'do-this',
  title: 'Do this',
  contexts: ['selection', 'link']
});

When right clicking on regular text, these menu items render fine. Just once per.

I don’t even specify editable contexts, and yet when the user right clicks on text in a textarea, say, the above menu items render twice.

Ideally, they shouldn’t render at all in editable contexts. How do I do that?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745664684a4639053.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信