8000 Spell checking needs to recheck when the provider is changed · Issue #1291 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Spell checking needs to recheck when the provider is changed #1291

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

Closed
anaisbetts opened this issue Mar 25, 2015 · 4 comments
Closed

Spell checking needs to recheck when the provider is changed #1291

anaisbetts opened this issue Mar 25, 2015 · 4 comments

Comments

8000
@anaisbetts
Copy link
Contributor

To Repro:

  1. Use setSpellCheckProvider to set up English spellchecking
  2. Realize the user is typing in German
  3. Hwhoops! Call setSpellCheckProvider again to check German words

Now, half the sentence still has misspelling marks back from when we thought it was English:

We need to reevaluate all of the words in the input box whenever we call setSpellCheckProvider

@zcbenz zcbenz added the bug label Mar 25, 2015
@hokein
Copy link
Contributor
hokein commented Jul 10, 2015

After looking more inside Blink, the current SpellCheck API interfaces in Blink doesn't support this usage.

The SpellCheck in Blink will be triggered when the currently typing word is end, basically typing a space or a line break, and there is no way to reevaluate the words that have already been reevaluated.

Suppose you have typed the following words with setSpellCheckProvider to setup English checking:

This is an te
             ^
             | cursor

Now you setSpellCheckProvider again to check China words, and keep typing characters a and .

This is an tea 

The spell check will only check the word tea with Chinese spell check provider.

@jfmdev
Copy link
jfmdev commented Mar 7, 2016

Chrome had this same issue two years ago: https://bugs.chromium.org/p/chromium/issues/detail?id=178379 (not sure if they solved it).

@zcbenz
Copy link
Contributor
zcbenz commented Jun 7, 2016

I'm closing this since we are not able to fix this without Chromium fixing it on their side, people concerned about this issue should go to the issue above to get Chromium team's attention.

@zcbenz zcbenz closed this as completed Jun 7, 2016
@jfmdev
Copy link
jfmdev commented Jun 7, 2016

Is not an ideal solution, but until this issue gets fixed at Chrome, you can try the following workaround:

After changing the provider, use Javascript to change the caret position, making it go over every word.

This works since moving the caret forces the spellchecker to re-evaluate every word touched by the caret.

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

4 participants
0