Pylyp Lebediev
Pylyp Lebediev

Reputation: 2121

How can I always show the 'x' to clear a search input in Microsoft Edge?

Is it possible to always show the default 'x' in a search input HTML element in Microsoft Edge only by using CSS (without creating custom component)?

image showing an input with the default 'x' for clearing any entered text

The pseudo-element ::-ms-clear and the opacity property do not have any affect on this 'x' button in Microsoft Edge.

Upvotes: 1

Views: 1164

Answers (1)

Kobi
Kobi

Reputation: 138027

Doesn't look like it's possible without creating your own x button. From MDN - ::-ms-clear:

The clear button is only shown on focused, non-empty text controls. This includes inputs that appear text-like or fall back to type="text".

Upvotes: 2

Related Questions