Commit 9f2dc689 authored by Phil Hughes's avatar Phil Hughes

Allow rows in file table to be opened in new window

This allows rows in the Vue file tree refactor to be opened in a
window/tab
parent 7f936a16
......@@ -97,11 +97,13 @@ export default {
},
},
methods: {
openRow() {
if (this.isFolder) {
openRow(e) {
if (e.target.tagName === 'A') return;
if (this.isFolder && !e.metaKey) {
this.$router.push(this.routerLinkTo);
} else {
visitUrl(this.url);
visitUrl(this.url, e.metaKey);
}
},
},
......
......@@ -104,7 +104,7 @@ describe('Repository table row component', () => {
if (pushes) {
expect(visitUrl).not.toHaveBeenCalled();
} else {
expect(visitUrl).toHaveBeenCalledWith('https://test.com');
expect(visitUrl).toHaveBeenCalledWith('https://test.com', undefined);
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment