mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-11-19 18:38:36 +00:00
#375: M1330912 (sync patch only)
This commit is contained in:
parent
7da09aa4e0
commit
bea84e5072
@ -146,6 +146,7 @@ nsEditor::nsEditor()
|
||||
, mDispatchInputEvent(true)
|
||||
, mIsInEditAction(false)
|
||||
, mHidingCaret(false)
|
||||
, mSpellCheckerDictionaryUpdated(true)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1309,6 +1310,11 @@ NS_IMETHODIMP nsEditor::SyncRealTimeSpell()
|
||||
GetInlineSpellChecker(enable, getter_AddRefs(spellChecker));
|
||||
|
||||
if (mInlineSpellChecker) {
|
||||
if (!mSpellCheckerDictionaryUpdated && enable) {
|
||||
mInlineSpellChecker->UpdateCurrentDictionary();
|
||||
mSpellCheckerDictionaryUpdated = true;
|
||||
}
|
||||
|
||||
// We might have a mInlineSpellChecker even if there are no dictionaries
|
||||
// available since we don't destroy the mInlineSpellChecker when the last
|
||||
// dictionariy is removed, but in that case spellChecker is null
|
||||
@ -5122,8 +5128,10 @@ void
|
||||
nsEditor::OnFocus(nsIDOMEventTarget* aFocusEventTarget)
|
||||
{
|
||||
InitializeSelection(aFocusEventTarget);
|
||||
if (mInlineSpellChecker) {
|
||||
mSpellCheckerDictionaryUpdated = false;
|
||||
if (mInlineSpellChecker && CanEnableSpellCheck()) {
|
||||
mInlineSpellChecker->UpdateCurrentDictionary();
|
||||
mSpellCheckerDictionaryUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -883,6 +883,7 @@ protected:
|
||||
bool mDispatchInputEvent;
|
||||
bool mIsInEditAction; // true while the instance is handling an edit action
|
||||
bool mHidingCaret; // whether caret is hidden forcibly.
|
||||
bool mSpellCheckerDictionaryUpdated; // Whether spellchecker dictionary is initialized after focused.
|
||||
|
||||
friend bool NSCanUnload(nsISupports* serviceMgr);
|
||||
friend class nsAutoTxnsConserveSelection;
|
||||
|
Loading…
Reference in New Issue
Block a user