Skip to content

Commit 0eadd0d

Browse files
authored
Merge pull request #42062 from nextcloud/use-href-for-search-results
Correct semantics for link opening in global search
2 parents add1758 + eb90cd0 commit 0eadd0d

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

core/src/components/GlobalSearch/SearchResult.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<NcListItem class="result-items__item"
33
:name="title"
44
:bold="false"
5-
@click="openResult(resourceUrl)">
5+
:href="resourceUrl"
6+
target="_self">
67
<template #icon>
78
<div aria-hidden="true"
89
class="result-items__item-icon"
@@ -91,11 +92,6 @@ export default {
9192
thumbnailErrorHandler() {
9293
this.thumbnailHasError = true
9394
},
94-
openResult(url) {
95-
if (url) {
96-
window.location = url
97-
}
98-
},
9995
},
10096
}
10197
</script>

dist/core-global-search.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-global-search.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)