Any solution need only work in WebKit browsers.
The internet is littered with attempts to make this work - some who claim to have it working and some who claim it can't be done. In my experience, none of the suggested methods have worked. Is this simply impossible?
Supposing I have a select like <select id="mySelect" />
Things I've tried:
select::before
-- Is added to the DOM, but doesn't render<label for="mySelect" />
-- Does nothing when clicked/tappeddocument.querySelector('select').click()
-- Does nothing- The method from this answer (React-specific) -- Cannot assign a
click
handler or any other handler that can programmatically open theselect
to begin with
I'm open even to a jQuery solution, even though we're using React and we would be loading jQuery solely for triggering the select
to open.
On third party select components: The goal is to trigger the mobile OS's native select control for the user, so something like React-Select is not suitable.