Index: gc_lang/fr/webext/content_scripts/init.js ================================================================== --- gc_lang/fr/webext/content_scripts/init.js +++ gc_lang/fr/webext/content_scripts/init.js @@ -310,11 +310,15 @@ break; case "getSpellSuggestions": oGrammalecte.oGCPanel.oTooltip.setSpellSuggestionsFor(result.sWord, result.aSugg, result.iSuggBlock, dInfo.sErrorId); break; case "getVerb": - oGrammalecte.oGCPanel.conjugateWith(result.oVerb, result.oConjTable); + if (dInfo.bStart) { + oGrammalecte.oGCPanel.conjugateWith(result.oVerb, result.oConjTable); + } else { + oGrammalecte.oGCPanel.displayConj(result.oConjTable); + } break; /* Commands received from the context menu (Context menu are initialized in background) */ Index: gc_lang/fr/webext/content_scripts/panel_gc.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_gc.js +++ gc_lang/fr/webext/content_scripts/panel_gc.js @@ -536,11 +536,11 @@ this.xParent.getElementById('grammalecte_conj_oint').checked = true; sVerb = sVerb.slice(0,-1).trim(); } if (sVerb) { this.sVerb = sVerb; - this.updateConj(); + this.updateConj(true); } else { this.xParent.getElementById('grammalecte_conj_verb').value = ""; } } } @@ -547,21 +547,21 @@ catch (e) { console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message); } } - updateConj () { + updateConj (bStart=false) { let bPro = this.xParent.getElementById('grammalecte_conj_opro').checked; let bNeg = this.xParent.getElementById('grammalecte_conj_oneg').checked; let bTpsCo = this.xParent.getElementById('grammalecte_conj_otco').checked; let bInt = this.xParent.getElementById('grammalecte_conj_oint').checked; let bFem = this.xParent.getElementById('grammalecte_conj_ofem').checked; if (this.sVerb) { xGrammalectePort.postMessage({ sCommand: "getVerb", dParam: {sVerb: this.sVerb, bPro: bPro, bNeg: bNeg, bTpsCo: bTpsCo, bInt: bInt, bFem: bFem}, - dInfo: {} + dInfo: {bStart: bStart} }); } } conjugateWith (oVerb, oConjTable) { @@ -596,17 +596,18 @@ this.xParent.getElementById('grammalecte_conj_opro').disabled = true; this.xParent.getElementById('grammalecte_conj_opro_lbl').style.color = "#CCC"; } this.xParent.getElementById('grammalecte_conj_note').textContent = "❦"; } - this._displayConj(oConjTable); + this.displayConj(oConjTable); } else { this.xParent.getElementById('grammalecte_conj_verb').style.color = "#BB4411"; } } - _displayConj (oConjTable) { + displayConj (oConjTable) { + // function called when results come from the Worker if (oConjTable === null) { return; } try { this.xParent.getElementById('grammalecte_conj_verb').Text = "";