perfetto-ui: Fix file bug link

Also fixes the bug causing the viewer to close when you click
the controls button.

Bug:151812373
Change-Id: Ibaa1a885e5b476a7887262d536a22a880b624549
diff --git a/ui/src/frontend/sidebar.ts b/ui/src/frontend/sidebar.ts
index 9a68f25..3f59347 100644
--- a/ui/src/frontend/sidebar.ts
+++ b/ui/src/frontend/sidebar.ts
@@ -217,7 +217,7 @@
     items: [
       {
         t: 'Controls',
-        a: toggleHelp,
+        a: openHelp,
         i: 'help',
       },
       {
@@ -244,6 +244,11 @@
   ],
 };
 
+function openHelp(e: Event) {
+  e.preventDefault();
+  toggleHelp();
+}
+
 function getFileElement(): HTMLInputElement {
   return document.querySelector('input[type=file]')! as HTMLInputElement;
 }
@@ -623,6 +628,7 @@
         let attrs = {
           onclick: typeof item.a === 'function' ? item.a : null,
           href: typeof item.a === 'string' ? item.a : '#',
+          target: typeof item.a === 'string' ? '_blank' : null,
           disabled: false,
         };
         if ((item as {internalUserOnly: boolean}).internalUserOnly === true) {
@@ -633,7 +639,8 @@
           attrs = {
             onclick: () => alert('Can not download or share external trace.'),
             href: '#',
-            disabled: true
+            target: null,
+            disabled: true,
           };
         }
         vdomItems.push(