Explorar o código

Fixed issue with empty selection

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
8273183325
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      extension/ui/content/content-ui.js

+ 3 - 1
extension/ui/content/content-ui.js

@@ -126,7 +126,9 @@ this.singlefile.ui = this.singlefile.ui || (() => {
 				while (!finished) {
 					if (rangeSelectionFound || treeWalker.currentNode == range.startContainer || treeWalker.currentNode == range.endContainer) {
 						rangeSelectionFound = true;
-						selectionFound = true;
+						if (range.startOffset != range.endOffset) {
+							selectionFound = true;
+						}
 						markSelectedNode(treeWalker.currentNode);
 					}
 					if (treeWalker.currentNode == range.startContainer) {