Grammalecte  Check-in [da6f681fdf]

Overview
Comment:[fx] make shortcuts work with contentEditable nodes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: da6f681fdf9dd716ef07674247f15a47d931e6d0f8d501fc27db8923fcceb66c
User & Date: olr on 2019-04-14 17:17:09
Other Links: manifest | tags
Context
2019-04-14
20:24
[fr] faux positif check-in: 30f8e2f6b3 user: olr tags: trunk, fr
17:17
[fx] make shortcuts work with contentEditable nodes check-in: da6f681fdf user: olr tags: trunk, fx
2019-04-13
11:10
[fx] update manifest check-in: 7fbff2010d user: olr tags: trunk, fx, v1.0
Changes

Modified gc_lang/fr/webext/content_scripts/init.js from [6e32e0cbb4] to [ed7658e898].

345
346
347
348
349
350
351
352

353
354
355
356
357
358
359
360
361
362
363
364

365
366
367
368
369
370
371
345
346
347
348
349
350
351

352
353
354
355
356
357
358
359
360
361
362
363

364
365
366
367
368
369
370
371







-
+











-
+







    let {sActionRequest} = oMessage;
    let xActiveNode = document.activeElement;
    switch (sActionRequest) {
        /*
            Commands received from the keyboard (shortcuts)
        */
        case "shortcutLexicographer":
            if (xActiveNode && (xActiveNode.tagName == "TEXTAREA" || xActiveNode.tagName == "INPUT")) {
            if (xActiveNode && (xActiveNode.tagName == "TEXTAREA" || xActiveNode.tagName == "INPUT" || xActiveNode.isContentEditable)) {
                lexicographerEditableNode(xActiveNode);
            } else {
                lexicographerPage();
            }
            break;
        case "shortcutTextFormatter":
            if (xActiveNode && (xActiveNode.tagName == "TEXTAREA" || xActiveNode.tagName == "INPUT")) {
                oGrammalecte.startFTPanel(xActiveNode);
            }
            break;
        case "shortcutGrammarChecker":
            if (xActiveNode && (xActiveNode.tagName == "TEXTAREA" || xActiveNode.tagName == "INPUT")) {
            if (xActiveNode && (xActiveNode.tagName == "TEXTAREA" || xActiveNode.tagName == "INPUT" || xActiveNode.isContentEditable)) {
                parseAndSpellcheckEditableNode(xActiveNode);
            } else {
                parseAndSpellcheckPage();
            }
            break;
        default:
            console.log("[Content script] Unknown command: " + sActionDone);