Spell checking language cannot be changed dynamically

Issue #2222 wontfix
Marshall Greenblatt created an issue

What steps will reproduce the problem?

TRY1:

  1. Only english dictionary exists at C:\Users[User]\AppData\Local\CEF\User Data\Dictionaries
  2. Run cefclient
  3. Load https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea
  4. Notice that spell-checking suggestions are in English.
  5. Select Tests > New Window from the test menu. In the new window, load http://tests/preferences and: A. Click the "Advanced" link. B. Change the spellcheck.dictionary value to "es". C. Click the "Apply Changes" button.
  6. Notice that spell-checking suggestions are no longer enabled, and es dictionary file is not downloaded.

TRY2:

  1. Run "cefclient.exe --lang=es"
  2. Load https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea
  3. Notice that the es dictionary file is downloaded, and that spell-checking suggestions are in Spanish.

TRY3:

  1. Run cefclient
  2. Load http://tests/preferences in the main window and: A. Click the "Advanced" link. B. Change the spellcheck.dictionary value to "es". C. Click the "Apply Changes" button.
  3. Select Tests > New Window from the test menu. Load https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea in the new window.
  4. Notice that spell-checking suggestions are in Spanish.
  5. Change the spellcheck.dictionary value to "en-US", notice that spell-checking suggestions are no longer enabled. Still not enabled if you reload or close/re-create the new window.

What is the expected output? What do you see instead?

Changing the spellcheck.dictionary value should result in download of that dictionary file if necessary and use of that language for all textareas in the same CefRequestContext. Instead, the language is "stuck" at whichever dictionary is loaded first.

What version of the product are you using? On what operating system?

Tested with 3.3071.1640.g1ebbf3c on Windows 10.

Comments (2)

  1. Marshall Greenblatt reporter

    In the SpellcheckService constructor the kSpellCheckDictionary value is converted to kSpellCheckDictionaries. Only kSpellCheckDictionaries is watched for changes. Consequently you need to modify the spellcheck.dictionaries array instead of the spellcheck.dictionary value.

  2. Log in to comment