-1

I have a select element that looks like this:

The arrow in there is a custom element. I'd like to make it so that the error is "invisible" to the mouse, and clicking it will actually select the element behind it. I tried using onClick on the arrow to focus() the select, but that doesn't actually initiate the dropdown menu:

Is there some kind of CSS magic trick that'll let me do this?

1

1 Answer 1

2

You are probably looking for pointer-events: none.

none
The element is never the target of pointer events; however, pointer events may target its descendant elements if those descendants have pointer-events set to some other value.

source: mdn

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.