From 339eaf37f2d76379b5d39f1986f72902d369983d Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 29 Sep 2021 21:47:38 +0200 Subject: [PATCH] web/elements: use dedicated button for search clear instead of webkit exclusive one closes #1499 Signed-off-by: Jens Langhammer --- web/src/elements/table/TableSearch.ts | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/web/src/elements/table/TableSearch.ts b/web/src/elements/table/TableSearch.ts index 321cee8ad..91f3cf376 100644 --- a/web/src/elements/table/TableSearch.ts +++ b/web/src/elements/table/TableSearch.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; -import { CSSResult, html, LitElement, TemplateResult } from "lit"; +import { css, CSSResult, html, LitElement, TemplateResult } from "lit"; import { customElement, property } from "lit/decorators"; import { ifDefined } from "lit/directives/if-defined"; @@ -20,7 +20,19 @@ export class TableSearch extends LitElement { onSearch?: (value: string) => void; static get styles(): CSSResult[] { - return [PFBase, PFButton, PFToolbar, PFInputGroup, PFFormControl, AKGlobal]; + return [ + PFBase, + PFButton, + PFToolbar, + PFInputGroup, + PFFormControl, + AKGlobal, + css` + ::-webkit-search-cancel-button { + display: none; + } + `, + ]; } render(): TemplateResult { @@ -50,6 +62,16 @@ export class TableSearch extends LitElement { this.onSearch((ev.target as HTMLInputElement).value); }} /> +