From edc4517cac9d71fb851fe9e58eb07c47db6c2c49 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Mon, 28 Jul 2014 13:16:37 +0200 Subject: EHTMLEditorView - Avoid forcing of the spell check when the body has no children --- e-util/e-html-editor-view.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c index e857a308a5..788d9bfb16 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 ( -- cgit v1.2.3