[SSE] Fix spellcheck

This commit is contained in:
Julia Radzhabova 2019-08-28 13:33:29 +03:00
parent 2c582b15bc
commit eec089ef86

View file

@ -103,6 +103,7 @@ define([
if (this.api) { if (this.api) {
this.api.asc_nextWord(); this.api.asc_nextWord();
} }
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
}, },
onDictionary: function() { onDictionary: function() {
@ -172,6 +173,7 @@ define([
this.api.asc_setDefaultLanguage(lang); this.api.asc_setDefaultLanguage(lang);
Common.localStorage.setItem("sse-spellcheck-locale", this.panelSpellcheck.cmbDictionaryLanguage.getValue()); Common.localStorage.setItem("sse-spellcheck-locale", this.panelSpellcheck.cmbDictionaryLanguage.getValue());
} }
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
}, },
onClickChange: function (btn, e) { onClickChange: function (btn, e) {
@ -179,6 +181,7 @@ define([
var rec = this.panelSpellcheck.suggestionList.getSelectedRec(); var rec = this.panelSpellcheck.suggestionList.getSelectedRec();
rec && this.api.asc_replaceMisspelledWord(rec.get('value'), this._currentSpellObj); rec && this.api.asc_replaceMisspelledWord(rec.get('value'), this._currentSpellObj);
} }
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
}, },
onClickChangeMenu: function (menu, item) { onClickChangeMenu: function (menu, item) {
@ -190,12 +193,14 @@ define([
rec && this.api.asc_replaceMisspelledWord(rec.get('value'), this._currentSpellObj, true); rec && this.api.asc_replaceMisspelledWord(rec.get('value'), this._currentSpellObj, true);
} }
} }
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
}, },
onClickIgnore: function () { onClickIgnore: function () {
if (this.api) { if (this.api) {
this.api.asc_ignoreMisspelledWord(this._currentSpellObj, false) this.api.asc_ignoreMisspelledWord(this._currentSpellObj, false)
} }
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
}, },
onClickIgnoreMenu: function (menu, item) { onClickIgnoreMenu: function (menu, item) {
@ -206,6 +211,7 @@ define([
this.api.asc_ignoreMisspelledWord(this._currentSpellObj, true); this.api.asc_ignoreMisspelledWord(this._currentSpellObj, true);
} }
} }
Common.NotificationCenter.trigger('edit:complete', this, {restorefocus:true});
}, },
onSpellCheckVariantsFound: function (property) { onSpellCheckVariantsFound: function (property) {