fix: re-enable the spellchecker when new language list set (#26119)
* fix: re-enable the spellchecker when new language list set Chromium recently added prefs logic to disable the spellchecker if the list of languages is empty, but the logic to re-enable if the languages are provided again lives in another part of Chromium. This change makes it so our API re-enables the spellchecker correctly when required. * chore: fix lint
This commit is contained in:
parent
6181c03df0
commit
9d18f9d54f
3 changed files with 38 additions and 3 deletions
|
@ -957,6 +957,9 @@ void Session::SetSpellCheckerLanguages(
|
|||
}
|
||||
browser_context_->prefs()->Set(spellcheck::prefs::kSpellCheckDictionaries,
|
||||
language_codes);
|
||||
// Enable spellcheck if > 0 languages, disable if no languages set
|
||||
browser_context_->prefs()->SetBoolean(spellcheck::prefs::kSpellCheckEnable,
|
||||
!languages.empty());
|
||||
}
|
||||
|
||||
void SetSpellCheckerDictionaryDownloadURL(gin_helper::ErrorThrower thrower,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue