From 5e9d189618dd3db5a01d6d5e33c42cb407c8d720 Mon Sep 17 00:00:00 2001 From: Mikhael Skvortsov Date: Wed, 17 Apr 2024 21:58:55 +0300 Subject: [PATCH] Don't select rows if text is selected --- meshmon.css | 1 + meshmon.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/meshmon.css b/meshmon.css index 590a66f..60bcf88 100644 --- a/meshmon.css +++ b/meshmon.css @@ -134,6 +134,7 @@ body { #nodes-seen { font-family: var(--font-family-verbatim); + font-weight: normal; background-color: var(--nodes-seen-bg-color); margin-left: 30px; width: 32px; diff --git a/meshmon.js b/meshmon.js index fcef84f..1bd6f41 100644 --- a/meshmon.js +++ b/meshmon.js @@ -373,10 +373,16 @@ function render(se) { cell.appendChild(decoded); headerRow.onclick = () => { + if (document.getSelection() != "") { + return; + } headerRow.classList.toggle('selected'); headerRow.nextElementSibling.classList.toggle('selected'); }; decodedRow.onclick = () => { + if (document.getSelection() != "") { + return; + } decodedRow.previousElementSibling.classList.toggle('selected'); decodedRow.classList.toggle('selected'); };