[evolution/wip/mcrha/webkit-jsc-api: 230/292] e-editor.js: Correct ordered list block format detection



commit 2c1f5b0cfe028ca3ec82fb5a4f8e5e1422f19bc6
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 8 12:19:46 2019 +0100

    e-editor.js: Correct ordered list block format detection

 data/webkit/e-editor.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/data/webkit/e-editor.js b/data/webkit/e-editor.js
index 4ec5a08dc7..2d899094fe 100644
--- a/data/webkit/e-editor.js
+++ b/data/webkit/e-editor.js
@@ -238,9 +238,11 @@ EvoEditor.maybeUpdateFormattingState = function(force)
                        else if (parent.tagName == "OL") {
                                obj.blockFormat = EvoEditor.E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST;
 
-                               if (parent.getAttribute("type").toUpperCase() == "I")
+                               var typeAttr = parent.getAttribute("type");
+
+                               if (typeAttr && typeAttr.toUpperCase() == "I")
                                        obj.blockFormat = 
EvoEditor.E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST_ROMAN;
-                               else if (parent.getAttribute("type").toUpperCase() == "I")
+                               else if (typeAttr && typeAttr.toUpperCase() == "A")
                                        obj.blockFormat = 
EvoEditor.E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST_ALPHA;
                        }
                }


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