Grammalecte  Check-in [ca2b939da5]

Overview
Comment:[fx][bug] gc panel: reset nodecontrol if no editable node
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: ca2b939da59785a0bbdd37a28d18d2bbe1519b6893cb75cdeefee5e277a2cf25
User & Date: olr on 2019-05-08 15:48:52
Other Links: manifest | tags
Context
2019-05-08
17:01
[fr] faux positifs check-in: 032e102f39 user: olr tags: trunk, fr
15:48
[fx][bug] gc panel: reset nodecontrol if no editable node check-in: ca2b939da5 user: olr tags: trunk, fx
15:48
[fr] faux positif check-in: 04dee8d4bc user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [ac0e21ecd2] to [d43eb4e247].

129
130
131
132
133
134
135


136
137
138
139
140
141
142
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144







+
+







        this.bWorking = false;
        this.clear();
        if (xNode) {
            this.oNodeControl.setNode(xNode);
            if (!(xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT")) {
                this.addMessage("Note : cette zone de texte n’est pas un champ de formulaire “textarea” mais un node HTML éditable. Une telle zone de texte est susceptible de contenir des éléments non textuels qui seront effacés lors de la correction.");
            }
        } else {
            this.oNodeControl.clear();
        }
    }

    recheckAll () {
        this.oTooltip.hide();
        this.clear();
        this.startWaitIcon();
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
932
933
934
935
936
937
938






939
940
941
942







-
-
-
-
-
-




                this.xNode.value = sText.slice(0,-1).normalize("NFC");
            } else {
                this.eraseContent();
                this.dParagraph.forEach((val, key) => {
                    this.xNode.appendChild(document.createTextNode(val.normalize("NFC")));
                    this.xNode.appendChild(document.createElement("br"));
                });
                /*
                this.dParagraph.forEach(function (val, key) {
                    sText += val + "<br/>";
                });
                this.xNode.innerHTML = sText.normalize("NFC");
                */
            }
        }
    }
}