Prevent going through file viewer action twice when navigationg using tab
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Thu, 13 Dec 2018 14:25:56 +0000 (15:25 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Thu, 13 Dec 2018 14:25:56 +0000 (15:25 +0100)
Feature #13540

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/views-components/context-menu/actions/file-viewer-actions.tsx

index b2ce556f891989b3f2c48fb9795bde089d699615..f1a46952d5712008ebda3efca3f7988a9abf2089 100644 (file)
@@ -56,20 +56,20 @@ export const FileViewerActions = connect(mapStateToProps)(
     ({ fileUrl, viewers, onClick }: FileViewerActionProps & { onClick: () => void }) =>
         <>
             {viewers.map(viewer =>
-                <a
+                <ListItem
+                    button
+                    component='a'
                     key={viewer.name}
                     style={{ textDecoration: 'none' }}
                     href={fillViewerUrl(fileUrl, viewer)}
                     onClick={onClick}
                     target='_blank'>
-                    <ListItem button>
-                        <ListItemIcon>
-                            <OpenIcon />
-                        </ListItemIcon>
-                        <ListItemText>
-                            {viewer.name}
-                        </ListItemText>
-                    </ListItem>
-                </a>
+                    <ListItemIcon>
+                        <OpenIcon />
+                    </ListItemIcon>
+                    <ListItemText>
+                        {viewer.name}
+                    </ListItemText>
+                </ListItem>
             )}
         </>);