Bug 740475 - Quoted reply editing issues

Check if won't add two BR elements in row to avoid unnecessary empty
line.
This commit is contained in:
Tomas Popela
2014-12-15 11:22:51 +01:00
parent 2feb834526
commit 6cb6ccda60

View File

@ -2216,8 +2216,12 @@ body_keyup_event_cb (WebKitDOMElement *element,
WEBKIT_DOM_NODE (selection_start_marker)),
NULL);
webkit_dom_node_append_child (
node, WEBKIT_DOM_NODE (br_element), NULL);
if (!WEBKIT_DOM_IS_HTMLBR_ELEMENT (webkit_dom_node_get_last_child (node)))
webkit_dom_node_append_child (
node, WEBKIT_DOM_NODE (br_element), NULL);
else
remove_node (WEBKIT_DOM_NODE (br_element));
remove_node (parent);
}
restore: