最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin0浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论