[evolution/wip/mcrha/webkit-jsc-api: 284/292] e-editor.js: Fix regression caught by /indent/typed unit test



commit 928c246e4cc4d30109d02242ad8d071b0dfd50f0
Author: Milan Crha <mcrha redhat com>
Date:   Tue Feb 18 16:18:30 2020 +0100

    e-editor.js: Fix regression caught by /indent/typed unit test

 data/webkit/e-editor.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/data/webkit/e-editor.js b/data/webkit/e-editor.js
index c4ef7ca158..1b2416e0e1 100644
--- a/data/webkit/e-editor.js
+++ b/data/webkit/e-editor.js
@@ -2402,7 +2402,8 @@ EvoEditor.AfterInputEvent = function(inputEvent, isWordDelim)
        if (isInsertParagraph && selection.isCollapsed && selection.anchorNode && 
selection.anchorNode.tagName == "DIV") {
                // for example when moving away from ul/ol, the newly created
                // paragraph can inherit styles from it, which is also negative text-indent
-               selection.anchorNode.removeAttribute("style");
+               selection.anchorNode.textIndent = "";
+               EvoEditor.removeEmptyStyleAttribute(selection.anchorNode);
 
                if (EvoEditor.mode == EvoEditor.MODE_PLAIN_TEXT) {
                        var node = selection.anchorNode, citeLevel = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]