corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [21/31] incubator-corinthia git commit: Fix selection highlight for footnotes and endnotes
Date Mon, 23 Feb 2015 11:39:24 GMT
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 <peter@uxproductivity.com>
Authored: Wed Feb 18 14:15:45 2015 +0700
Committer: Peter Kelly <peter@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);
             }


Mime
View raw message