electron-editor-context-menu icon indicating copy to clipboard operation
electron-editor-context-menu copied to clipboard

Clicking on spelling suggestion inside a <webview> doesn't correct the misspelled text

Open nfriend opened this issue 9 years ago • 2 comments

I'm using electron-editor-context-menu to show spelling suggestions inside a webview (using a preload script, see here: https://github.com/electron/electron/pull/942#issuecomment-68074516). Everything works correctly except that the spelling suggestions do not replace the misspelled text when they are selected in the context menu. I'm fairly certain this functionality was working prior to a refactor that resulted in me moving my application into a webview.

nfriend avatar Sep 07 '16 17:09 nfriend

I've been meaning to test this more and PR it but replacing this line https://github.com/mixmaxhq/electron-editor-context-menu/blob/master/src/index.js#L102

with this:

remote.getCurrentWebContents().webContents.replaceMisspelling(suggestion);

works for me in a webview.

ccnokes avatar Dec 03 '16 03:12 ccnokes

Oh neat find @ccnokes! I'd take a PR for that.

wearhere avatar Dec 03 '16 04:12 wearhere