Commit f81c2219 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'ph/vueRepoMetaClick' into 'master'

Allow rows in file table to be opened in new window

See merge request gitlab-org/gitlab!19228
parents 81e4272c 9f2dc689
......@@ -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