From 6b83cc656374880fc8b8766368dc0a17ad3bc215 Mon Sep 17 00:00:00 2001 From: Josh Johnson <josh@fyrelogic.com> Date: Sat, 20 Feb 2016 12:42:09 -0500 Subject: [PATCH] Fix Node Clicks Clicking nodes no longer causes the tree to disappear. --- src/services/XmlTreeService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/XmlTreeService.ts b/src/services/XmlTreeService.ts index 343753b..0b4e86f 100644 --- a/src/services/XmlTreeService.ts +++ b/src/services/XmlTreeService.ts @@ -139,6 +139,7 @@ export class XmlTreeService { /* 1px */ } </style> + <script>function noop(){};</script> </head> <body> `; @@ -165,12 +166,12 @@ export class XmlTreeService { if (node.attributes) { for (let i = 0; i < node.attributes.length; i++) { - html += `<li class="xml xml-attribute"><a href="">${node.attributes.item(i).localName} = '${node.attributes.item(i).value}'</a></li>`; + html += `<li class="xml xml-attribute"><a href="javascript:noop()">${node.attributes.item(i).localName} = '${node.attributes.item(i).value}'</a></li>`; } } if (!node.childNodes && node.textContent) { - html += `<li class="xml xml-text"><a href="">${node.textContent}</a></li>`; + html += `<li class="xml xml-text"><a href="javascript:noop()">${node.textContent}</a></li>`; } if (node.childNodes) {