mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user