From f7cc003743b37875dc818bb3a043e744021f4891 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Tue, 29 Oct 2024 12:16:53 -0400 Subject: [PATCH] '#2351 Closes all parents of clicked object reference link to force back repaints after object reopen and scroll. --- .../resources/iped/parsers/css/uuidlink.js | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/iped-parsers/iped-parsers-impl/src/main/resources/iped/parsers/css/uuidlink.js b/iped-parsers/iped-parsers-impl/src/main/resources/iped/parsers/css/uuidlink.js index 5935e77918..e63b77002d 100644 --- a/iped-parsers/iped-parsers-impl/src/main/resources/iped/parsers/css/uuidlink.js +++ b/iped-parsers/iped-parsers-impl/src/main/resources/iped/parsers/css/uuidlink.js @@ -1,21 +1,39 @@ function clickUID(uid) { var obj = document.querySelector("details[treeuid='"+uid+"']"); var a = obj; + var b=obj; + while (a) { - a.open = 'true'; + if(a instanceof HTMLElement){ + a.removeAttribute('open'); + } + b = a; a = a.parentNode; } - obj.scrollIntoView(); - - if(!obj.highlight){ - obj.highlight=true; - bcolor = obj.style.backgroundColor; - obj.style.backgroundColor="#AAAAAA"; - setTimeout(function(){ - obj.style.backgroundColor=bcolor; - obj.highlight=false;},1000); - } - + + setTimeout(function(){ + a = obj; + while (a) { + if(a instanceof HTMLElement){ + a.open = 'true'; + } + b = a; + a = a.parentNode; + } + + obj.scrollIntoView(); + + if(!obj.highlight){ + obj.highlight=true; + bcolor = obj.style.backgroundColor; + obj.style.backgroundColor="#AAAAAA"; + setTimeout(function(){ + obj.style.backgroundColor=bcolor; + obj.highlight=false;},1000); + } + + },1); + } window.containsNavigableTree=true;