Kaynağa Gözat

allow selection of simple tags

Gildas 3 ay önce
ebeveyn
işleme
9632da17c0
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      src/ui/content/content-ui.js

+ 4 - 0
src/ui/content/content-ui.js

@@ -222,6 +222,10 @@ function markSelectedContent() {
 						selectionFound = true;
 						markSelectedNode(treeWalker.currentNode);
 					}
+					if (range.startContainer === range.endContainer && selection.rangeCount == 1 && range.startOffset == 0 && range.endOffset == 0) {
+						selectionFound = true;
+						markSelectedNode(treeWalker.currentNode);
+					}
 				}
 				if (selectionFound && treeWalker.currentNode == range.startContainer) {
 					markSelectedParents(treeWalker.currentNode);