Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs two clicks to get spell checker context menu #98

Open
snene opened this issue Oct 25, 2017 · 8 comments
Open

Needs two clicks to get spell checker context menu #98

snene opened this issue Oct 25, 2017 · 8 comments

Comments

@snene
Copy link

snene commented Oct 25, 2017

electron: 1.7.8
electron-spellchecker: 1.1.2

Thanks for the example provided, I got spell checker to work in my application inside the webview. It detects the wrongly spelled words and marks them. But when I right click on the wrong word, I don't see the menu entries for the spell checker. But when I right click the second time, I see them.

I am also using electron-context-menu to add other context menu entries.

I am wondering why do I need to click twice to get the spell checker menu entries. Any pointers? Thanks a lot!

@Nantris
Copy link

Nantris commented Nov 20, 2017

It's likely you are inadvertently creating a context menu somewhere else. For example when using Chrome developer tools I have an inspect element option on the first click, and have to click again to get the normal context menu.

@WilliamHolmes
Copy link

@snene @slapbox Do you think it's possible to add these spelling mistake corrections to the initial context menu (first click) ?

@snene
Copy link
Author

snene commented Apr 23, 2018

@WilliamHolmes Yes, the solution is to not display your application's context menu when the spell checker is supposed to display its for a misspelled word. e.g. for your context menu add a check like following

// Build right-click context menu when webview's ready
  require('electron-context-menu')({
    window: webview,
    // If spell checker context menu is going to be displayed don't show ours
    shouldShowMenu: (event, params) => !(params.isEditable && params.misspelledWord && params.misspelledWord.length),

@WilliamHolmes
Copy link

Thanks @snene i’ll try that.
Im still trying to figure out how to change the electron browser context menu (copy, paste, etc.) language as that is where the spelling corrections are placed.

@WilliamHolmes
Copy link

WilliamHolmes commented Apr 24, 2018

@snene @slapbox
image

Any ideas how to change that electron browser context menu to another language?

@Nantris
Copy link

Nantris commented Apr 24, 2018

Unfortunately no. Have you downloaded the source code and searched for the string "Search with Google" ?

That's where I'd start. If you find out how to do this, please be sure to come back and update us!

@WilliamHolmes
Copy link

Thanks for he reply. I’ve opened a issue/question to the wider community for some feed back. #114

@WilliamHolmes
Copy link

FYI Found it.
#114 (comment)

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

No branches or pull requests

3 participants