[evolution/wip/mcrha/webkit-jsc-api] e-editor.js: Correct ordered list block format detection
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/mcrha/webkit-jsc-api] e-editor.js: Correct ordered list block format detection
- Date: Fri, 8 Nov 2019 11:18:54 +0000 (UTC)
commit afaf617ac3afb23bb52ff9e22ab8ca2bd2555429
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]