[evolution] EHTMLEditorView - Avoid forcing of the spell check when the body has no children



commit edc4517cac9d71fb851fe9e58eb07c47db6c2c49
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Jul 28 13:16:37 2014 +0200

    EHTMLEditorView - Avoid forcing of the spell check when the body has no children

 e-util/e-html-editor-view.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index e857a30..788d9bf 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -350,6 +350,9 @@ refresh_spell_check (EHTMLEditorView *view,
        /* Sometimes the web view is not focused, so we have to save the selection
         * manually into the body */
        if (!selection_start_marker || !selection_end_marker) {
+               if (!webkit_dom_node_get_first_child (WEBKIT_DOM_NODE (body)))
+                       return;
+
                selection_start_marker = webkit_dom_document_create_element (
                        document, "SPAN", NULL);
                webkit_dom_element_set_id (


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