[evolution] EHTMLEditorView - Bringing anchor from quoted text to body with Backspace doesn't work
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorView - Bringing anchor from quoted text to body with Backspace doesn't work
- Date: Tue, 8 Sep 2015 07:16:31 +0000 (UTC)
commit ee428d6edae5d8ccfdd951341f051e6e16d508b7
Author: Tomas Popela <tpopela redhat com>
Date: Tue Sep 8 09:12:00 2015 +0200
EHTMLEditorView - Bringing anchor from quoted text to body with Backspace doesn't work
Pressing Backspace in the beginning of an anchor that is in the beginning of the
quoted block won't move the anchor/block to the body, but it will concatenate it
to the previous block. We need to explicitly check if we are in the anchor.
e-util/e-html-editor-view.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 0ec9063..bd3849c 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -3928,9 +3928,19 @@ change_quoted_block_to_normal (EHTMLEditorView *view)
prev_sibling = webkit_dom_node_get_previous_sibling (
WEBKIT_DOM_NODE (selection_start_marker));
+ if (!prev_sibling) {
+ WebKitDOMNode *parent;
+
+ parent = webkit_dom_node_get_parent_node (
+ WEBKIT_DOM_NODE (selection_start_marker));
+ if (WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (parent))
+ prev_sibling = webkit_dom_node_get_previous_sibling (parent);
+ }
+
if (WEBKIT_DOM_IS_ELEMENT (prev_sibling))
success = element_has_class (
WEBKIT_DOM_ELEMENT (prev_sibling), "-x-evo-quoted");
+
/* We really have to be in the beginning of paragraph and
* not on the beginning of some line in the paragraph */
if (success && webkit_dom_node_get_previous_sibling (prev_sibling))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]