FIX: Tooltip in quick search didn't work (#14542)

This commit is contained in:
Gerhard Schlager 2021-10-06 23:30:05 +02:00 committed by GitHub
parent b632ffd802
commit d6a24e9cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@ import { createWidget } from "discourse/widgets/widget";
import discourseDebounce from "discourse-common/lib/debounce"; import discourseDebounce from "discourse-common/lib/debounce";
import getURL from "discourse-common/lib/get-url"; import getURL from "discourse-common/lib/get-url";
import { h } from "virtual-dom"; import { h } from "virtual-dom";
import I18n from "I18n";
import { iconNode } from "discourse-common/lib/icon-library"; import { iconNode } from "discourse-common/lib/icon-library";
import { isiPad } from "discourse/lib/utilities"; import { isiPad } from "discourse/lib/utilities";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
@ -214,9 +213,7 @@ export default createWidget("search-menu", {
searchInput.push(h("div.searching", h("div.spinner"))); searchInput.push(h("div.searching", h("div.spinner")));
} else { } else {
const clearButton = this.attach("link", { const clearButton = this.attach("link", {
attributes: { title: "search.clear_search",
title: I18n.t("search.clear_search"),
},
action: "clearSearch", action: "clearSearch",
className: "clear-search", className: "clear-search",
contents: () => iconNode("times"), contents: () => iconNode("times"),
@ -226,7 +223,7 @@ export default createWidget("search-menu", {
href: this.fullSearchUrl({ expanded: true }), href: this.fullSearchUrl({ expanded: true }),
contents: () => iconNode("sliders-h"), contents: () => iconNode("sliders-h"),
className: "show-advanced-search", className: "show-advanced-search",
title: I18n.t("search.open_advanced"), title: "search.open_advanced",
}); });
if (searchData.term) { if (searchData.term) {