From 38aef4c0afb34998ac66d2e0680c9fadc840c7f0 Mon Sep 17 00:00:00 2001 From: Heath123 Date: Fri, 18 Dec 2020 12:22:25 +0000 Subject: [PATCH] Fix buggy scrolling --- html/mainPage/js/packetDom.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/html/mainPage/js/packetDom.js b/html/mainPage/js/packetDom.js index 6b23b90..c3c11d3 100644 --- a/html/mainPage/js/packetDom.js +++ b/html/mainPage/js/packetDom.js @@ -32,10 +32,9 @@ function trimData (data) { // Function to trim the size of stringified data for } function addPacketToDOM (packet) { + const isHidden = filteringLogic.packetFilteredByFilterBox(packet, sharedVars.lastFilter, sharedVars.hiddenPackets) sharedVars.allPacketsHTML.push([ - `
  • + `
  • ${escapeHtml(packet.hexIdString)} ${escapeHtml(packet.meta.name)} ${escapeHtml(trimData(packet.data))} @@ -46,7 +45,9 @@ function addPacketToDOM (packet) { sharedVars.packetList.parentElement.scrollTop = sharedVars.packetList.parentElement.scrollHeight; } } */ - sharedVars.packetsUpdated = true + if (!isHidden) { + sharedVars.packetsUpdated = true + } updateHidden() }