sindresorhus/electron-context-menu

Omitting default actions if already provided

Open

#70 opened on 2019年5月9日

GitHub で見る
 (7 comments) (0 reactions) (0 assignees)JavaScript (1,471 stars) (167 forks)user submission
enhancementhelp wanted

説明

I'm defining a custom "Copy" action, which does something a bit different than the default "Copy" action, to some buttons, but on right click the content of the button gets selected (and I can't make them unselectable) and so the menu displays 2 "Copy" actions, the one I defined and the one this library defines:

I think I could generate the whole menu manually via the menu option but that would mean detecting all the cases where the default actions should be showed.

Could we instead add an option, canOverrideDefaultActions or something, where before inserting each default action the library check if another action with the same label has been provided already?

コントリビューターガイド