search: Fix unclickable search footer

Clicking the bolded text in the search footer didn't work. This change
fixes that by working around the underlying issue, rewriting the search
footer template to use v-html instead of v-i18n-html. I don't know
exactly know why this works, but it does. Hopefully we'll be able to
fix the underlying issue and undo this workaround in the future.

Bug: T327229
Change-Id: I5d05d6ade1a34b12163bb96aa888ed3cfee78b4d
This commit is contained in:
Roan Kattouw 2023-01-27 16:03:09 -08:00 committed by Jdlrobson
parent e02b87fe1f
commit 5bcc1597ca

View file

@ -40,7 +40,14 @@
</template> </template>
<!-- eslint-disable-next-line vue/no-template-shadow --> <!-- eslint-disable-next-line vue/no-template-shadow -->
<template #search-footer-text="{ searchQuery }"> <template #search-footer-text="{ searchQuery }">
<!--
Normally we'd use v-i18n-html here, like this:
<span v-i18n-html:vector-searchsuggest-containing="[ searchQuery ]"></span> <span v-i18n-html:vector-searchsuggest-containing="[ searchQuery ]"></span>
but that causes strange rerendering issues and makes the <strong> tag rendered
by the message unclickable, see T327229.
-->
<!-- eslint-disable-next-line max-len, vue/no-v-html -->
<span v-html="$i18n( 'vector-searchsuggest-containing' ).params( [ searchQuery ] ).parse()"></span>
</template> </template>
</cdx-typeahead-search> </cdx-typeahead-search>
</template> </template>