Procházet zdrojové kódy

allow selection of simple tags

Gildas před 3 měsíci
rodič
revize
9632da17c0
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  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);