electron-editor-context-menu
electron-editor-context-menu copied to clipboard
Clicking on spelling suggestion inside a <webview> doesn't correct the misspelled text
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.
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.
Oh neat find @ccnokes! I'd take a PR for that.