[evolution] Redoing of "Pasting a link and pressing the Return key after it" is wrong



commit 111330ebe881a6a1ef44b4abd2bd3bf5a452a7ea
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Aug 19 14:57:38 2016 +0200

    Redoing of "Pasting a link and pressing the Return key after it" is wrong
    
    We have to stop to save the content between the previous position and the current
    one if we go above BODY.

 .../web-extension/e-editor-dom-functions.c         |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index cbc90e5..fe55796 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -3107,7 +3107,8 @@ save_history_for_input (EEditorPage *editor_page)
                parent_start = webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (element_start));
                parent_end = webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (element_end));
 
-               while (parent_start && parent_end && !webkit_dom_node_is_same_node (parent_start, 
parent_end)) {
+               while (parent_start && parent_end && !webkit_dom_node_is_same_node (parent_start, parent_end) 
&&
+                      !WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent_start) && !WEBKIT_DOM_IS_HTML_BODY_ELEMENT 
(parent_end)) {
                        webkit_dom_node_insert_before (
                                WEBKIT_DOM_NODE (fragment),
                                webkit_dom_node_clone_node_with_error (parent_start, FALSE, NULL),


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