You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/02/23 12:39:24 UTC

[21/31] incubator-corinthia git commit: Fix selection highlight for footnotes and endnotes

Fix selection highlight for footnotes and endnotes

When a footnote or endnote is completely selected, put a selection
element around the note itself, rather than just its contents. This is
necessary for the blue selection highlight to be shown behind the CSS
generated content, the '[' and ']' characters, which surround the note.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/8ad49fd7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/8ad49fd7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/8ad49fd7

Branch: refs/heads/experimentzip
Commit: 8ad49fd7573eb8483ad07da9c8be30e1a70cb162
Parents: 8d49faa
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Wed Feb 18 14:15:45 2015 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Wed Feb 18 14:19:21 2015 +0700

----------------------------------------------------------------------
 Editor/src/Selection.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8ad49fd7/Editor/src/Selection.js
----------------------------------------------------------------------
diff --git a/Editor/src/Selection.js b/Editor/src/Selection.js
index 0f8e2dc..c4f8efb 100644
--- a/Editor/src/Selection.js
+++ b/Editor/src/Selection.js
@@ -319,6 +319,13 @@ var Selection_print;
                     newHighlights.push(wrapped);
                 }
             }
+            else if (isNoteNode(node)) {
+                if (!isSelectionHighlight(node.parentNode)) {
+                    var wrapped = DOM_wrapNode(node,"SPAN");
+                    DOM_setAttribute(wrapped,"class",Keys.SELECTION_CLASS);
+                    newHighlights.push(wrapped);
+                }
+            }
             else if (node.nodeType == Node.TEXT_NODE) {
                 createTextHighlight(node,data,newHighlights);
             }