Index: gc_lang/fr/webext/content_scripts/menu.js ================================================================== --- gc_lang/fr/webext/content_scripts/menu.js +++ gc_lang/fr/webext/content_scripts/menu.js @@ -33,13 +33,13 @@ _createListeners () { this.xNode.addEventListener('focus', (e) => { this.xButton.style.display = "block"; }); - this.xNode.addEventListener('blur', (e) => { + /*this.xNode.addEventListener('blur', (e) => { window.setTimeout(() => {this.xButton.style.display = "none";}, 300); - }); + });*/ } _getText () { return (this.xNode.tagName == "TEXTAREA") ? this.xNode.value : this.xNode.innerText; } @@ -46,11 +46,14 @@ _createMenu () { try { let xMenu = oGrammalecte.createNode("div", {id: this.sMenuId, className: "grammalecte_menu"}); let xCloseButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_close_button", textContent: "×"} ); - xCloseButton.onclick = () => { this.switchMenu(); } + xCloseButton.onclick = () => { + this.xButton.style.display = "none"; + this.switchMenu(); + } xMenu.appendChild(xCloseButton); xMenu.appendChild(oGrammalecte.createNode("div", {className: "grammalecte_menu_header", textContent: "GRAMMALECTE"})); // Text formatter if (this.xNode.tagName == "TEXTAREA") { let xTFButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item", textContent: "Formateur de texte"});