sindresorhus/electron-context-menu

Clarifying the purpose of correctAutomatically

eengoron opened this issue · 3 comments

Hey @sindresorhus --

First, I just wanted to say thank you for getting spellcheck merged. This is awesome!

I'm currently updating my application to use native spellcheck, and I had a quick question about the correctAutomatically menuitem.

How is this item supposed to be used? From

correctAutomatically: decorateMenuItem({
id: 'correctAutomatically',
label: 'Correct Spelling Automatically',
visible: props.isEditable && hasText && props.misspelledWord && props.dictionarySuggestions.length > 0,
click() {
const target = webContents(win);
target.insertText(props.dictionarySuggestions[0]);
it looks like it mimics the functionality of clicking on the first spelling suggestion item which shows up earlier in the context menu order.

Is there something I'm missing here? If that is the case, would you be open to a PR to hide it behind a showCorrectAutomatically flag?

Thanks again!

You're right. It's not very useful. It should not have been added. I missed how it worked when reviewing the PR. The PR that added the spellchecking was pretty sloppy, so I'm not surprised I missed something.

See: https://github.com/sindresorhus/electron-context-menu/releases/tag/v2.0.0