[search] Don't destroy #p-search element
The #p-search element is present in at least the Vector, Vector V2, Timeless, and Monobook skins. This is because the HTML for the element is generated in MediaWiki Core. At the very least, the SearchSatisfaction instrument relies on the element always being present. Update the skins.vector.search module to simplify the App component template so that it doesn't render a div#p-search element and mount that component on the #searchform element instead. Bug: T274869 Change-Id: Ifde679b62484fda7661fded2d978b78adac9f5da
This commit is contained in:
parent
90da534616
commit
9914d813d6
|
@ -1,36 +1,34 @@
|
|||
<template>
|
||||
<div id="p-search">
|
||||
<wvui-typeahead-search
|
||||
id="searchform"
|
||||
ref="searchForm"
|
||||
:client="getClient"
|
||||
:domain="domain"
|
||||
:footer-search-text="$i18n('searchsuggest-containing').escaped()"
|
||||
:suggestions-label="$i18n('searchresults').escaped()"
|
||||
:accesskey="searchAccessKey"
|
||||
:title="searchTitle"
|
||||
:placeholder="searchPlaceholder"
|
||||
:aria-label="searchPlaceholder"
|
||||
:initial-input-value="searchQuery"
|
||||
:button-label="$i18n( 'search' ).escaped()"
|
||||
:form-action="action"
|
||||
:search-language="language"
|
||||
:show-thumbnail="showThumbnail"
|
||||
:show-description="showDescription"
|
||||
@fetch-start="instrumentation.onFetchStart"
|
||||
@fetch-end="instrumentation.onFetchEnd"
|
||||
@suggestion-click="instrumentation.onSuggestionClick"
|
||||
<wvui-typeahead-search
|
||||
id="searchform"
|
||||
ref="searchForm"
|
||||
:client="getClient"
|
||||
:domain="domain"
|
||||
:footer-search-text="$i18n('searchsuggest-containing').escaped()"
|
||||
:suggestions-label="$i18n('searchresults').escaped()"
|
||||
:accesskey="searchAccessKey"
|
||||
:title="searchTitle"
|
||||
:placeholder="searchPlaceholder"
|
||||
:aria-label="searchPlaceholder"
|
||||
:initial-input-value="searchQuery"
|
||||
:button-label="$i18n( 'search' ).escaped()"
|
||||
:form-action="action"
|
||||
:search-language="language"
|
||||
:show-thumbnail="showThumbnail"
|
||||
:show-description="showDescription"
|
||||
@fetch-start="instrumentation.onFetchStart"
|
||||
@fetch-end="instrumentation.onFetchEnd"
|
||||
@suggestion-click="instrumentation.onSuggestionClick"
|
||||
>
|
||||
<input type="hidden"
|
||||
name="title"
|
||||
value="Special:Search"
|
||||
>
|
||||
<input type="hidden"
|
||||
name="title"
|
||||
value="Special:Search"
|
||||
>
|
||||
<input type="hidden"
|
||||
name="wprov"
|
||||
:value="wprov"
|
||||
>
|
||||
</wvui-typeahead-search>
|
||||
</div>
|
||||
<input type="hidden"
|
||||
name="wprov"
|
||||
:value="wprov"
|
||||
>
|
||||
</wvui-typeahead-search>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -12,7 +12,7 @@ var
|
|||
function initApp( searchForm, search ) {
|
||||
// eslint-disable-next-line no-new
|
||||
new Vue( {
|
||||
el: '#p-search',
|
||||
el: searchForm,
|
||||
/**
|
||||
*
|
||||
* @param {Function} createElement
|
||||
|
|
Loading…
Reference in New Issue