Skip to content

Commit

Permalink
Merge pull request #42062 from nextcloud/use-href-for-search-results
Browse files Browse the repository at this point in the history
Correct semantics for link opening in global search
  • Loading branch information
Fenn-CS authored Dec 6, 2023
2 parents add1758 + eb90cd0 commit 0eadd0d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions core/src/components/GlobalSearch/SearchResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<NcListItem class="result-items__item"
:name="title"
:bold="false"
@click="openResult(resourceUrl)">
:href="resourceUrl"
target="_self">
<template #icon>
<div aria-hidden="true"
class="result-items__item-icon"
Expand Down Expand Up @@ -91,11 +92,6 @@ export default {
thumbnailErrorHandler() {
this.thumbnailHasError = true
},
openResult(url) {
if (url) {
window.location = url
}
},
},
}
</script>
Expand Down
4 changes: 2 additions & 2 deletions dist/core-global-search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-global-search.js.map

Large diffs are not rendered by default.

0 comments on commit 0eadd0d

Please sign in to comment.