Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

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

Open
nfriend opened this issue Sep 7, 2016 · 2 comments

Comments

@nfriend
Copy link

nfriend commented Sep 7, 2016

I'm using electron-editor-context-menu to show spelling suggestions inside a webview (using a preload script, see here: electron/electron#942 (comment)). 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.

@ccnokes
Copy link
Contributor

ccnokes commented Dec 3, 2016

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.

@wearhere
Copy link
Contributor

wearhere commented Dec 3, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants